diff --git a/common/religion/doctrines/00_core_tenets.txt b/common/religion/doctrines/00_core_tenets.txt index 08ba5b4d..d732dc39 100644 --- a/common/religion/doctrines/00_core_tenets.txt +++ b/common/religion/doctrines/00_core_tenets.txt @@ -866,6 +866,106 @@ } } + against_all_odds = { + icon = core_tenet_against_all_odds + + is_shown = { + religion_tag = anglican_religion + } + piety_cost = { + value = faith_tenet_cost_low + # Multiplier for keeping same tenet + if = { + limit = { has_doctrine = against_all_odds } + multiply = faith_unchanged_doctrine_cost_mult + } + } + + traits = { + virtues = { just = 2 } + sins = { arbitrary = 2 } + } + + parameters = { + easier_to_convert_faith_in_hills_forests = yes + easier_to_convert_culture_in_same_faith_hills_forests = yes + harder_to_convert_faith_away_in_hills_forests = yes + sanctioned_false_conversion = yes + } + + character_modifier = { + hills_attrition_mult = -0.5 + hills_levy_size = 0.3 + hills_advantage = 5 + forest_attrition_mult = -0.5 + forest_levy_size = 0.3 + forest_advantage = 5 + } + + } + + for_king_and_country = { + icon = core_tenet_for_king_and_country + is_shown = { + religion_tag = anglican_religion + } + piety_cost = { + value = faith_tenet_cost_low + # Multiplier for keeping same tenet + if = { + limit = { has_doctrine = against_all_odds } + multiply = faith_unchanged_doctrine_cost_mult + } + } + + traits = { + virtues = { just = 2 } + sins = { arbitrary = 2 } + } + + parameters = { + legalism_modified_law_costs = yes + legalism_modified_law_costs_2 = yes + legalism_reduced_faction_virtues = yes + legalism_increased_faction_sins = yes + legalism_trust_just_leader_active = yes + excommunication_active = yes + } + } + last_knights_of_britain = { + icon = core_tenet_songs_of_roland + + is_shown = { + religion_tag = anglican_religion + } + piety_cost = { + value = faith_tenet_cost_low + # Multiplier for keeping same tenet + if = { + limit = { has_doctrine = last_knights_of_britain } + multiply = faith_unchanged_doctrine_cost_mult + } + } + + traits = { + virtues = { brave = 2 } + sins = { craven = 2 } + } + character_modifier = { + prowess = 4 + tolerance_advantage_mod = 2 + accolade_glory_gain_mult = 0.1 + } + + parameters = { + clergy_can_fight = yes + cheaper_holy_wars_active = yes + great_holy_wars_active = yes + ghw_no_hof_conversion_buffs_active = yes + pilgrimage_decision_active = yes + } + + } tenet_people_of_the_book = { icon = core_tenet_legalism is_shown = { @@ -908,7 +1008,7 @@ value = faith_tenet_cost_low # Multiplier for keeping same tenet if = { - limit = { has_doctrine = tenet_universal_scripture } + limit = { has_doctrine = one_king_to_rule_them_all } multiply = faith_unchanged_doctrine_cost_mult } } @@ -967,7 +1067,7 @@ # Multiplier for keeping same tenet if = { - limit = { has_doctrine = tenet_pursuit_of_power } + limit = { has_doctrine = tenet_restore_the_crown } multiply = faith_unchanged_doctrine_cost_mult } } @@ -1005,7 +1105,7 @@ # Multiplier for keeping same tenet if = { - limit = { has_doctrine = tenet_pursuit_of_power } + limit = { has_doctrine = tenet_songs_of_roland } multiply = faith_unchanged_doctrine_cost_mult } } @@ -1030,7 +1130,7 @@ # Multiplier for keeping same tenet if = { - limit = { has_doctrine = tenet_struggle_submission } + limit = { has_doctrine = tenet_the_first_age } multiply = faith_unchanged_doctrine_cost_mult } } @@ -1056,7 +1156,7 @@ # Multiplier for keeping same tenet if = { - limit = { has_doctrine = tenet_struggle_submission } + limit = { has_doctrine = tenet_lorekeepers } multiply = faith_unchanged_doctrine_cost_mult } } @@ -2434,6 +2534,101 @@ } } + the_queen_of_summer = { + icon = the_queen_of_summer + + is_shown = { + religion_tag = wicca_religion + } + piety_cost = { + value = faith_tenet_cost_low + # Multiplier for keeping same tenet + if = { + limit = { has_doctrine = the_queen_of_summer } + multiply = faith_unchanged_doctrine_cost_mult + } + } + + parameters = { + believes_in_harmony_with_nature_invisible = yes + piety_from_feasts_active = yes + mandatory_feast_attendance = yes + allows_brewery = yes + } + + character_modifier = { + forest_advantage = 5 + forest_attrition_mult = -0.25 + taiga_advantage = 5 + taiga_attrition_mult = -0.25 + jungle_advantage = 5 + jungle_attrition_mult = -0.25 + build_gold_cost = 0.1 + county_opinion_add = 5 + vassal_opinion = 5 + courtier_opinion = 5 + } + } + + king_of_winter = { + icon = the_king_of_winter + is_shown = { + religion_tag = wicca_religion + } + piety_cost = { + value = faith_tenet_cost_low + # Multiplier for keeping same tenet + if = { + limit = { has_doctrine = king_of_winter } + multiply = faith_unchanged_doctrine_cost_mult + } + } + + character_modifier = { + prowess = 4 + tolerance_advantage_mod = 2 + } + + parameters = { + clergy_can_fight = yes + vows_of_poverty_active = yes + unlock_voluntary_laampdom_faith = yes + } + + traits = { + virtues = { generous = 2 } + sins = { greedy = 2 } + } + } + the_book_of_shadows = { + icon = core_tenet_alexandrian_catechism + is_shown = { + religion_tag = wicca_religion + } + piety_cost = { + value = faith_tenet_cost_low + # Multiplier for keeping same tenet + if = { + limit = { has_doctrine = the_book_of_shadows } + multiply = faith_unchanged_doctrine_cost_mult + } + } + + parameters = { + tenet_esotericism_mystic_education = yes + } + character_modifier = { + monthly_learning_lifestyle_xp_gain_mult = 0.2 + learning_per_stress_level = 2 + } + + traits = { + virtues = { + scholar + lifestyle_mystic = { weight = 1 } + } + } + } tenet_ritual_celebrations = { icon = core_tenet_ritual_celebrations diff --git a/common/religion/doctrines/02_doctrines_special.txt b/common/religion/doctrines/02_doctrines_special.txt index e221eef5..9dc45c1a 100644 --- a/common/religion/doctrines/02_doctrines_special.txt +++ b/common/religion/doctrines/02_doctrines_special.txt @@ -112,6 +112,11 @@ special_tolerance = { hostility_override_special_doctrine_catholic_rite = 0 } } + special_doctrine_via_media = { + parameters = { + hostility_override_special_doctrine_christian = 1 + } + } special_doctrine_christian = { visible = no } diff --git a/common/religion/religions/NEOW_anglican.txt b/common/religion/religions/NEOW_anglican.txt index 0e711c3c..ee37a257 100644 --- a/common/religion/religions/NEOW_anglican.txt +++ b/common/religion/religions/NEOW_anglican.txt @@ -38,7 +38,6 @@ virtues = { forgiving compassionate chaste } sins = { vengeful sadistic lustful } } - reserved_male_names = { #put witch names here later Andrew Antoninus Bartolomeus Benedict Christian Christopher Clement Constantine David Demetrius Eustace George Gregory Hans Isaac Joakim Jacob John Jordan Joseph Laurence Magnus Marcus Martin Matthew Michael Nicholas Patrick Paul Peter Philip @@ -253,13 +252,13 @@ #holy_site = segrada_familia #Special Tolerance | placeholder - #doctrine = special_doctrine_ecumenical_christian - doctrine = special_doctrine_esoteric_witchcraft + doctrine = special_doctrine_via_media + doctrine = special_doctrine_christian #Tenets | placeholder - doctrine = tenet_vows_of_poverty - doctrine = tenet_armed_pilgrimages - doctrine = tenet_pursuit_of_power + doctrine = against_all_odds + doctrine = for_king_and_country + doctrine = last_knights_of_britain holy_order_names = { #placeholder { name = "holy_order_knights_templar" coat_of_arms = "ho_knights_templar" } diff --git a/common/religion/religions/NEOW_pagan.txt b/common/religion/religions/NEOW_pagan.txt index bf7d8216..3d1eec93 100644 --- a/common/religion/religions/NEOW_pagan.txt +++ b/common/religion/religions/NEOW_pagan.txt @@ -39,10 +39,10 @@ doctrine = doctrine_funeral_stoic traits = { - virtues = { forgiving compassionate chaste } - sins = { vengeful sadistic lustful } + virtues = { } + sins = { } } - + reserved_male_names = { #put witch names here later Andrew Antoninus Bartolomeus Benedict Christian Christopher Clement Constantine David Demetrius Eustace George Gregory Hans Isaac Joakim Jacob John Jordan Joseph Laurence Magnus Marcus Martin Matthew Michael Nicholas Patrick Paul Peter Philip diff --git a/common/religion/religions/NEOW_thelema.txt b/common/religion/religions/NEOW_thelema.txt index 146b65cf..f84db344 100644 --- a/common/religion/religions/NEOW_thelema.txt +++ b/common/religion/religions/NEOW_thelema.txt @@ -35,8 +35,8 @@ doctrine = doctrine_funeral_stoic traits = { - virtues = { forgiving compassionate chaste } - sins = { vengeful sadistic lustful } + virtues = { forgiving compassionate lustful } + sins = { vengeful sadistic chaste } } reserved_male_names = { #put larp names here later diff --git a/common/religion/religions/NEOW_third_estatist.txt b/common/religion/religions/NEOW_third_estatist.txt index 121d02d9..995fdcee 100644 --- a/common/religion/religions/NEOW_third_estatist.txt +++ b/common/religion/religions/NEOW_third_estatist.txt @@ -35,8 +35,8 @@ doctrine = doctrine_funeral_stoic traits = { - virtues = { forgiving compassionate chaste } - sins = { vengeful sadistic lustful } + virtues = { } + sins = { } } reserved_male_names = { #put witch names here later diff --git a/common/religion/religions/NEOW_wicca.txt b/common/religion/religions/NEOW_wicca.txt index 383b3619..98eb1595 100644 --- a/common/religion/religions/NEOW_wicca.txt +++ b/common/religion/religions/NEOW_wicca.txt @@ -35,8 +35,8 @@ doctrine = doctrine_funeral_stoic traits = { - virtues = { forgiving compassionate chaste } - sins = { vengeful sadistic lustful } + virtues = { } + sins = { } } reserved_male_names = { #put witch names here later @@ -257,9 +257,9 @@ doctrine = special_doctrine_esoteric_witchcraft #Tenets | placeholder - doctrine = tenet_vows_of_poverty - doctrine = tenet_armed_pilgrimages - doctrine = tenet_pursuit_of_power + doctrine = the_queen_of_summer + doctrine = king_of_winter + doctrine = the_book_of_shadows holy_order_names = { #placeholder { name = "holy_order_knights_templar" coat_of_arms = "ho_knights_templar" } diff --git a/common/script_values/00_activity_values.txt b/common/script_values/00_activity_values.txt new file mode 100644 index 00000000..ea89990a --- /dev/null +++ b/common/script_values/00_activity_values.txt @@ -0,0 +1,2539 @@ +####################### +# AI_WILL_DO MODIFIERS + +activity_option_expense_gold_low_value = { value = major_gold_value } +activity_option_expense_gold_high_value = { value = monumental_gold_value } + +activity_option_likes_cheap_expense_value = { + # AI values. + ## Greed weights us up dramatically. + add = { + value = ai_greed + multiply = 2 + desc = debug_gui.activity_weight.ai_value.greed + } + ## Sociability weights us down a bit, since activities are inherently at least somewhat social. + add = { + value = ai_sociability + multiply = -0.5 + desc = debug_gui.activity_weight.ai_value.sociability + } + # Traits. + ## Personality traits. + ### Greedy doesn't want to spend money. + if = { + limit = { has_trait = greedy } + add = { + value = 100 + desc = debug_gui.activity_weight.trait.greedy + } + } + ### Generous is happy to dole out cash. + if = { + limit = { has_trait = generous } + add = { + value = -100 + desc = debug_gui.activity_weight.trait.generous + } + } + ## Stress traits. + ### Profligate will happily spend itself into debt. + if = { + limit = { has_trait = profligate } + add = { + value = -200 + desc = debug_gui.activity_weight.trait.profligate + } + } + ### Improvident will likewise, provided they consider this a form of giving to others. + if = { + limit = { considers_social_presence_a_gift_to_other_trigger = yes } + add = { + value = -200 + desc = debug_gui.activity_weight.trait.improvident.giving_circumstances + } + } + # Gold. + ## If we're poor, we'll try to avoid massive expenses unnecessarily. + if = { + limit = { + # Can't be a big spender. + NOR = { + has_trait = profligate + considers_social_presence_a_gift_to_other_trigger = yes + } + # Or have more than a certain amount of negative greed. + ai_greed >= high_negative_ai_value + # _Then_ we check to see how your finances are. + short_term_gold <= activity_option_expense_gold_low_value + } + add = { + value = 200 + desc = debug_gui.activity_weight.gold.prefers_cheapness + } + } +} + +activity_option_likes_middling_expense_value = { + # AI values. + ## Rationality weights us up a bit, since we only want to spend a sensible amount. + add = { + value = ai_rationality + multiply = 0.75 + desc = debug_gui.activity_weight.ai_value.rationality + } + ## Boldness weights us down, since we're caring more what other people think of us — either because we want to spend more or we want to spend less. + add = { + value = ai_boldness + multiply = -0.5 + desc = debug_gui.activity_weight.ai_value.boldness + } + # Traits. + ## Personality traits. + ### Generous is happy to dole out cash. + if = { + limit = { has_trait = generous } + add = { + value = 50 + desc = debug_gui.activity_weight.trait.generous + } + } + ### Greedy doesn't want to spend money. + if = { + limit = { has_trait = greedy } + add = { + value = -50 + desc = debug_gui.activity_weight.trait.greedy + } + } + ## Stress traits. + ### Profligate will happily spend itself into debt. + if = { + limit = { has_trait = profligate } + add = { + value = 50 + desc = debug_gui.activity_weight.trait.profligate + } + } + ### Improvident will likewise, provided they consider this a form of giving to others. + if = { + limit = { considers_social_presence_a_gift_to_other_trigger = yes } + add = { + value = 50 + desc = debug_gui.activity_weight.trait.improvident.giving_circumstances + } + } + # Gold. + ## We mostly care about gold if we fall within the bandwidths for the other two values. + if = { + limit = { + short_term_gold < activity_option_expense_gold_high_value + short_term_gold > activity_option_expense_gold_low_value + } + add = { + value = 200 + desc = debug_gui.activity_weight.gold.prefers_middling + } + } +} + +activity_option_likes_heavy_expense_value = { + # AI values. + ## Sociability weights us up a bit, since activities are inherently at least somewhat social. + add = { + value = ai_sociability + multiply = 0.5 + desc = debug_gui.activity_weight.ai_value.greed + } + ## Greed weights us down dramatically. + add = { + value = ai_greed + multiply = -2 + desc = debug_gui.activity_weight.ai_value.sociability + } + # Traits. + ## Personality traits. + ### Generous is happy to dole out cash. + if = { + limit = { has_trait = generous } + add = { + value = 100 + desc = debug_gui.activity_weight.trait.generous + } + } + ### Greedy doesn't want to spend money. + if = { + limit = { has_trait = greedy } + add = { + value = -100 + desc = debug_gui.activity_weight.trait.greedy + } + } + ## Stress traits. + ### Profligate will happily spend itself into debt. + if = { + limit = { has_trait = profligate } + add = { + value = 200 + desc = debug_gui.activity_weight.trait.profligate + } + } + ### Improvident will likewise, provided they consider this a form of giving to others. + if = { + limit = { considers_social_presence_a_gift_to_other_trigger = yes } + add = { + value = 200 + desc = debug_gui.activity_weight.trait.improvident.giving_circumstances + } + } + # Gold. + ## If we're rich, we'll try to spend up a bit, since we can splash out. + if = { + limit = { + # Some characters just don't want to make a whole big thing of it. + NOR = { + has_trait = greedy + has_trait = shy + has_trait = humble + } + # Or have more than a certain amount of positive greed. + ai_greed <= high_positive_ai_value + # _Then_ we check to see how your finances are. + short_term_gold >= activity_option_expense_gold_high_value + } + add = { + value = 200 + desc = debug_gui.activity_weight.gold.prefers_expense + } + } +} + +activity_option_likes_functional_food_option_value = { + # AI Values. + ## Boldness weights us up, since we're showing off. + add = { + value = ai_boldness + multiply = 1 + desc = debug_gui.activity_weight.ai_value.boldness + } + ## Sociability weights us up a little, as we want to put on a fancy feast. + add = { + value = ai_sociability + multiply = 0.25 + desc = debug_gui.activity_weight.ai_value.sociability + } + # Traits. + ## Personality traits. + ### Humble hates showing off. + if = { + limit = { has_trait = humble } + add = { + value = 150 + desc = debug_gui.activity_weight.trait.humble + } + } + ### Shy prefers not to show off. + if = { + limit = { has_trait = shy } + add = { + value = 50 + desc = debug_gui.activity_weight.trait.shy + } + } + ### Gregarious quite likes showing off. + if = { + limit = { has_trait = gregarious } + add = { + value = -50 + desc = debug_gui.activity_weight.trait.gregarious + } + } + ### Arrogant loves showing off. + if = { + limit = { has_trait = arrogant } + add = { + value = -150 + desc = debug_gui.activity_weight.trait.arrogant + } + } + ## Stress traits. + ### Drunkard wants fancier fare available. + if = { + limit = { has_trait = drunkard } + add = { + value = -100 + desc = debug_gui.activity_weight.trait.drunkard + } + } + ### Hashishiyah wants fancier fare available. + if = { + limit = { has_trait = hashishiyah } + add = { + value = -100 + desc = debug_gui.activity_weight.trait.hashishiyah + } + } +} + +activity_option_likes_ostentatious_food_option_value = { + # AI Values. + ## Sociability weights us down a little, as we don't want to be the centre of attention. + add = { + value = ai_sociability + multiply = -0.25 + desc = debug_gui.activity_weight.ai_value.sociability + } + ## Boldness weights us down, since we're trying to avoid showing off. + add = { + value = ai_boldness + multiply = -1 + desc = debug_gui.activity_weight.ai_value.boldness + } + # Traits. + ## Personality traits. + ### Arrogant loves showing off. + if = { + limit = { has_trait = arrogant } + add = { + value = 150 + desc = debug_gui.activity_weight.trait.arrogant + } + } + ### Gregarious quite likes showing off. + if = { + limit = { has_trait = gregarious } + add = { + value = 50 + desc = debug_gui.activity_weight.trait.gregarious + } + } + ### Shy prefers not to show off. + if = { + limit = { has_trait = shy } + add = { + value = -50 + desc = debug_gui.activity_weight.trait.shy + } + } + ### Humble hates showing off. + if = { + limit = { has_trait = humble } + add = { + value = -150 + desc = debug_gui.activity_weight.trait.humble + } + } + ## Stress traits. + ### Drunkard wants fancier fare available. + if = { + limit = { has_trait = drunkard } + add = { + value = 100 + desc = debug_gui.activity_weight.trait.drunkard + } + } + ### Hashishiyah wants fancier fare available. + if = { + limit = { has_trait = hashishiyah } + add = { + value = 100 + desc = debug_gui.activity_weight.trait.hashishiyah + } + } +} + +activity_option_food_prefers_small_volume_value = { + # AI Values. + ## AI values here would be kinda muddled, since the relevant traits overlap heavily with greedy/generous, so we sede the section to the expense values. + # Traits. + ## Personality traits. + ### Temperate wants the requisite amount. + if = { + limit = { has_trait = temperate } + add = { + value = 150 + desc = debug_gui.activity_weight.trait.temperate + } + } + ### Humble has a slight preference for smaller amounts. + if = { + limit = { has_trait = humble } + add = { + value = 50 + desc = debug_gui.activity_weight.trait.humble + } + } + ### Arrogant has a slight preference for larger amounts. + if = { + limit = { has_trait = arrogant } + add = { + value = -50 + desc = debug_gui.activity_weight.trait.arrogant + } + } + ### Gluttonous wants _more_. + if = { + limit = { has_trait = gluttonous } + add = { + value = -150 + desc = debug_gui.activity_weight.trait.gluttonous + } + } + ## Stress traits. + ### Inappetetic prefers fewer courses. + if = { + limit = { has_trait = inappetetic } + add = { + value = 50 + desc = debug_gui.activity_weight.trait.inappetetic + } + } + ### Comfort Eater wants more. + if = { + limit = { has_trait = comfort_eater } + add = { + value = -50 + desc = debug_gui.activity_weight.trait.comfort_eater + } + } + ## Other traits. + ### Reveller likes a decent revel. + if = { + limit = { has_trait = lifestyle_reveler } + add = { + value = -100 + desc = debug_gui.activity_weight.trait.lifestyle_reveler + } + } + # Other. + ### Trying to lose weight, fewer courses. + if = { + limit = { has_character_modifier = losing_weight_modifier } + add = { + value = 200 + desc = debug_gui.activity_weight.modifier.losing_weight + } + } + ### Trying to gain weight, more courses. + if = { + limit = { has_character_modifier = gaining_weight_modifier } + add = { + value = -100 + desc = debug_gui.activity_weight.modifier.gaining_weight + } + } +} + +activity_option_prefers_large_volume_value = { + # AI Values. + ## AI values here would be kinda muddled, since the relevant traits overlap heavily with greedy/generous, so we sede the section to the expense values. + # Traits. + ## Personality traits. + ### Gluttonous wants _more_. + if = { + limit = { has_trait = gluttonous } + add = { + value = 150 + desc = debug_gui.activity_weight.trait.gluttonous + } + } + ### Arrogant has a slight preference for larger amounts. + if = { + limit = { has_trait = arrogant } + add = { + value = 50 + desc = debug_gui.activity_weight.trait.arrogant + } + } + ### Humble has a slight preference for smaller amounts. + if = { + limit = { has_trait = humble } + add = { + value = -50 + desc = debug_gui.activity_weight.trait.humble + } + } + ### Temperate wants less. + if = { + limit = { has_trait = temperate } + add = { + value = -150 + desc = debug_gui.activity_weight.trait.temperate + } + } + ## Stress traits. + ### Comfort Eater enjoys having plenty of food. + if = { + limit = { has_trait = comfort_eater } + add = { + value = 50 + desc = debug_gui.activity_weight.trait.comfort_eater + } + } + ### Inappetetic prefers fewer courses. + if = { + limit = { has_trait = inappetetic } + add = { + value = -50 + desc = debug_gui.activity_weight.trait.inappetetic + } + } + ## Other traits. + ### Reveller likes a decent revel. + if = { + limit = { has_trait = lifestyle_reveler } + add = { + value = 100 + desc = debug_gui.activity_weight.trait.lifestyle_reveler + } + } + # Other. + ### Trying to gain weight, more courses. + if = { + limit = { has_character_modifier = gaining_weight_modifier } + add = { + value = 200 + desc = debug_gui.activity_weight.modifier.gaining_weight + } + } + ### Trying to lose weight, fewer courses. + if = { + limit = { has_character_modifier = losing_weight_modifier } + add = { + value = -100 + desc = debug_gui.activity_weight.modifier.losing_weight + } + } +} + +###################### +# FEAST STUFF +###################### +standard_feast_cooldown_time = { + value = 5 + if = { + limit = { + root.culture = { + has_cultural_parameter = more_frequent_feasts + } + } + multiply = 0.5 + } +} + +min_feast_event_spacing = 10 +max_feast_event_spacing = 15 + +feast_activity_cost = { + value = 0 + add = standard_activity_base_cost + if = { + limit = { + culture = { + has_cultural_parameter = more_expensive_feasts + } + } + multiply = 2 + } + if = { + limit = { + exists = var:protected_alcohol_stores + var:protected_alcohol_stores > 0 + } + multiply = 0.5 + } +} + +feast_normal_option_cost = { + value = 10 + multiply = activity_cost_scale_by_tier + multiply = activity_cost_scale_by_era +} + +feast_good_option_cost = { + value = 35 + multiply = activity_cost_scale_by_tier + multiply = activity_cost_scale_by_era +} + +feast_activity_cost_discount_max = { + value = 0.5 +} +feast_activity_cost_discount_max_value = { + value = feast_activity_cost_discount_max + subtract = 1 +} +feast_activity_cost_discount_medium = { + value = 0.7 +} +feast_activity_cost_discount_medium_value = { + value = feast_activity_cost_discount_medium + subtract = 1 +} +feast_activity_cost_discount_min = { + value = 0.9 +} +feast_activity_cost_discount_min_value = { + value = feast_activity_cost_discount_min + subtract = 1 +} + +feast_opinion_max_food_value = { + value = 15 + + if = { + limit = { + is_vassal_of = scope:host + has_vassal_stance = courtly + is_participant_in_activity = scope:activity + } + add = 10 + } + + scope:host = { + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + amenity_level = { type = court_food_quality value >= 5 } + } + add = 10 + } + multiply = court_brewmaster_multiplier + } +} + +feast_opinion_medium_food_value = { + value = 10 + + if = { + limit = { + is_vassal_of = scope:host + has_vassal_stance = courtly + is_participant_in_activity = scope:activity + } + add = 5 + } + + scope:host = { + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + amenity_level = { type = court_food_quality value >= 5 } + } + add = 5 + } + multiply = court_brewmaster_multiplier + } +} + +feast_opinion_mediocre_food_value = { + value = 5 + + if = { + limit = { + is_vassal_of = scope:host + has_vassal_stance = courtly + is_participant_in_activity = scope:activity + } + subtract = 3 + } + + scope:host = { + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + amenity_level = { type = court_food_quality value >= 5 } + } + add = 5 + } + else_if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + amenity_level = { type = court_food_quality value >= 5 } + } + add = 2 + } + multiply = court_brewmaster_multiplier + } +} + +### END FEASTS + +pilgrimage_base_cost = { + value = 0 + add = standard_activity_base_cost +} + +standard_activity_base_cost = { + value = 30 + multiply = { + value = root.primary_title.tier + subtract = 1 + min = 1 + } + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + } + multiply = 0.5 + } + if = { + limit = { + root.primary_title.tier > tier_duchy + } + add = 50 + } +} + +# Deprecated +standard_activity_cost = { + value = 50 + multiply = { + value = root.primary_title.tier + subtract = 1 + min = 1 + } + if = { + limit = { + root.primary_title.tier > tier_duchy + } + add = 50 + } + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + } + multiply = 0.5 + } +} + +law_legacy_cost_reduction_mult = 0.3 + +feast_events_ewan_0001_murder_scheme_bonus_time_to_use_value = 20 +feast_events_ewan_0001_murder_scheme_bonus_added_base_success_value = 10 + +###################### +# PLAYDATE STUFF +###################### +standard_playdate_cooldown_time = 1095 + +playdate_participants = 10 +min_default_playdate_events = 3 +min_playdate_event_spacing = 5 +max_playdate_event_spacing = 10 +playdate_initial_event_delay = 3 + +max_playdate_duration = { + value = max_playdate_event_spacing + multiply = { + value = min_default_playdate_events + subtract = 1 + } + add = playdate_initial_event_delay + add = 1 # To be sure no values get set on the last tick +} + +standard_playdate_activity_cost = { + value = 10 + multiply = { + value = root.primary_title.tier + subtract = 1 + min = 1 + } + if = { + limit = { + root.primary_title.tier > tier_duchy + } + add = 25 + } + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + } + multiply = 0.5 + } +} + + +activity_medium_gold_value = { + value = medium_gold_value +} + +activity_minor_gold_value = { + value = minor_gold_value + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + } + multiply = 0.5 + } +} + +###################### +# HOLD COURT STUFF +###################### +standard_hold_court_cooldown_time = 1825 + +###################### +# GRAND RITE STUFF +###################### +standard_witch_ritual_cooldown_time = 1825 + +###################### +# ADVENTURE STUFF +###################### +# Using the same measure of distances as pilgrimage +long_adventure_max_length = 5000000 # 5M Over this distance, it will be an exceptionally long pilgrimage +medium_adventure_max_length = 1000000 # 1M, slightly larger than 1 'holy roman empire' away +short_adventure_max_length = 100000 # 100K, slightly larger than 1 'ireland' away. + +very_long_adventure_var = 5 +long_adventure_var = 4 +medium_adventure_var = 3 +short_adventure_var = 2 + +###################### +# PETITION STUFF +###################### + +standard_petition_liege_cooldown_time = 1825 +petition_liege_refusal_tyranny_value = 2 + +### Council + +# For checking if petitioner is significantly better than current councillor +councillor_diplomacy_threshold_value = { # Petitioner's diplomacy - 3 + value = scope:petition_vassal.diplomacy + subtract = 3 +} + +councillor_martial_threshold_value = { # Petitioner's martial - 3 + value = scope:petition_vassal.martial + subtract = 3 +} + +councillor_stewardship_threshold_value = { # Petitioner's stewardship - 3 + value = scope:petition_vassal.stewardship + subtract = 3 +} + +councillor_intrigue_threshold_value = { # Petitioner's intrigue - 3 + value = scope:petition_vassal.intrigue + subtract = 3 +} + +councillor_learning_threshold_value = { # Petitioner's learning - 3 + value = scope:petition_vassal.learning + subtract = 3 +} + +### Debt + +# Amount liege needs to pay to get petioner out of debt +petitioner_debt_positivization_value = { + value = 0 + add = scope:petition_vassal.gold + multiply = -1 +} + +petitioner_debt_positivization_root_value = { + value = 0 + add = root.gold + multiply = -1 +} + +### War Aid + +#Amount of levies liege will grant +petitioner_war_aid_levies_value = { + value = 0 + add = scope:petition_vassal.petition_war_aid_strongest_enemy_strength_value + subtract = scope:petition_vassal.petition_war_aid_vassal_strength_value + multiply = 2 + min = 500 + max = scope:petition_liege.max_military_strength +} + +petitioner_war_aid_levies_cost_value = { + value = petitioner_war_aid_levies_value + divide = 20 + +} + +petitioner_war_aid_levies_cost_threshold_value = { + value = petitioner_war_aid_levies_cost_value + multiply = 2 +} + +### Control + +county_control_scaling_cost_value = { + value = 0 + scope:petition_vassal = { + every_held_title = { + limit = { + tier = tier_county + county_control < medium_county_control + } + add = 25 + } + } + min = 50 + max = 150 +} + +petition_liege_county_control_count_value = { + value = 0 + every_in_list = { + list = petition_liege_county_control_list + add = 1 + } +} + +petition_liege_county_control_modifier_value = { + value = 0 + add = marshal_increase_control_base_total + multiply = 0.1 +} + +### Convert + +petition_liege_county_convert_count_value = { + value = 0 + every_in_list = { + list = petition_liege_county_convert_list + add = 1 + } +} + +petition_liege_county_convert_modifier_value = { + value = 0 + add = court_chaplain_conversion_base_total + multiply = 0.1 +} + +### Opinion + +petition_liege_county_opinion_count_value = { + value = 0 + every_in_list = { + list = petition_liege_county_opinion_list + add = 1 + } +} + +### Fortify + +petition_liege_fortify_border_count_value = { + value = 0 + every_in_list = { + list = petition_liege_fortify_border_list + add = 1 + } +} + +### Development + +# Amount of development difference of liege's capital +petitioner_development_difference_decision_value = { + value = 0 + if = { + limit = { exists = capital_province } + add = capital_province.county.development_level + } + multiply = 1.5 +} + +# Amount of development difference of liege's capital +petitioner_development_difference_value = { + value = 0 + add = scope:petition_vassal.capital_province.county.development_level + multiply = 1.5 +} + +### Petition Parameters + +# War Aid War Score +petition_war_aid_score_value = { + value = 25 +} + +petition_liege_defender_strength_value = { + value = 0 + every_war_defender = { + add = max_military_strength + every_hired_mercenary = { add = max_military_strength } + } +} + +petition_liege_attacker_strength_value = { + value = 0 + every_war_attacker = { + add = max_military_strength + every_hired_mercenary = { add = max_military_strength } + } +} + +# War Aid Liege Strength Min +petition_war_aid_strongest_enemy_strength_value = { + value = 0 + if = { + limit = { + any_character_war = { + root = { is_leader_in_war = prev } + root = { is_attacker_in_war = prev } + defender_war_score >= petition_war_aid_score_value + } + } + ordered_character_war = { + limit = { + root = { is_leader_in_war = prev } + root = { is_attacker_in_war = prev } + defender_war_score >= petition_war_aid_score_value + } + order_by = petition_liege_defender_strength_value + add = petition_liege_defender_strength_value + } + } + else_if = { + limit = { + any_character_war = { + root = { is_leader_in_war = prev } + root = { is_defender_in_war = prev } + attacker_war_score >= petition_war_aid_score_value + } + } + ordered_character_war = { + limit = { + root = { is_leader_in_war = prev } + root = { is_defender_in_war = prev } + attacker_war_score >= petition_war_aid_score_value + } + order_by = petition_liege_attacker_strength_value + add = petition_liege_attacker_strength_value + } + } +} + +petition_war_aid_vassal_strength_value = { + value = 0 + if = { + limit = { + any_character_war = { + root = { is_leader_in_war = prev } + root = { is_attacker_in_war = prev } + defender_war_score >= petition_war_aid_score_value + } + } + ordered_character_war = { + limit = { + root = { is_leader_in_war = prev } + root = { is_attacker_in_war = prev } + defender_war_score >= petition_war_aid_score_value + } + order_by = petition_liege_defender_strength_value + add = petition_liege_attacker_strength_value + } + } + else_if = { + limit = { + any_character_war = { + root = { is_leader_in_war = prev } + root = { is_defender_in_war = prev } + attacker_war_score >= petition_war_aid_score_value + } + } + ordered_character_war = { + limit = { + root = { is_leader_in_war = prev } + root = { is_defender_in_war = prev } + attacker_war_score >= petition_war_aid_score_value + } + order_by = petition_liege_attacker_strength_value + add = petition_liege_defender_strength_value + } + } +} + +petition_war_aid_vassal_liege_combined_value = { + value = petition_war_aid_vassal_strength_value + add = petition_war_aid_liege_merc_value +} + +petition_war_aid_difference_value = { + value = petition_war_aid_strongest_enemy_strength_value + subtract = petition_war_aid_vassal_liege_combined_value +} + +petition_county_opinion_value = { + value = -25 +} + +petition_war_aid_liege_ally_value = { + value = 0 + root.liege = { + add = max_military_strength + if = { + limit = { + any_ally = { + NOT = { is_vassal_of = root.liege } + } + } + every_ally = { + limit = { + NOT = { is_vassal_of = root.liege } + } + add = max_military_strength + } + } + every_hired_mercenary = { add = max_military_strength } + } +} + +petition_war_aid_liege_merc_value = { + value = 0 + scope:petition_liege = { + add = max_military_strength + every_hired_mercenary = { add = max_military_strength } + } +} + +petition_war_aid_liege_ally_advantage_value = { + value = petition_war_aid_liege_ally_value + multiply = 2 +} + +petition_war_aid_rebels_value = { + value = 0 + liege = { + if = { + limit = { + any_character_war = { + primary_defender = root.liege + OR = { + using_cb = peasant_war + using_cb = independence_faction_war + using_cb = liberty_faction_war + using_cb = populist_war + using_cb = claimant_faction_war + using_cb = depose_war + using_cb = refused_liege_demand_war + using_cb = independence_war + } + } + } + every_character_war = { + limit = { + primary_defender = root.liege + OR = { + using_cb = peasant_war + using_cb = independence_faction_war + using_cb = liberty_faction_war + using_cb = populist_war + using_cb = claimant_faction_war + using_cb = depose_war + using_cb = refused_liege_demand_war + using_cb = independence_war + } + } + add = petition_liege_attacker_strength_value + } + } + } + multiply = 2 +} + +petition_war_aid_external_value = { + value = 0 + liege = { + if = { + limit = { + any_character_war = { + root.liege = { is_leader_in_war = prev } + trigger_if = { + limit = { + root.liege = { is_defender_in_war = prev } + } + OR = { + primary_attacker.primary_title.tier = root.liege.primary_title.tier + petition_liege_attacker_strength_value > petition_war_aid_liege_ally_value + } + } + trigger_else = { + limit = { + root.liege = { is_defender_in_war = prev } + } + OR = { + primary_attacker.primary_title.tier = root.liege.primary_title.tier + petition_liege_attacker_strength_value > petition_war_aid_liege_ally_value + } + } + } + } + ordered_character_war = { + limit = { + root.liege = { is_leader_in_war = prev } + trigger_if = { + limit = { + root.liege = { is_defender_in_war = prev } + } + OR = { + primary_attacker.primary_title.tier = root.liege.primary_title.tier + petition_liege_attacker_strength_value > petition_war_aid_liege_ally_value + } + } + trigger_else = { + limit = { + root.liege = { is_defender_in_war = prev } + } + OR = { + primary_attacker.primary_title.tier = root.liege.primary_title.tier + petition_liege_defender_strength_value > petition_war_aid_liege_ally_value + } + } + } + add = petition_liege_attacker_strength_value + } + } + } + multiply = 2 +} + +petition_liege_war_aid_ongoing_count_trigger = { + value = 0 + every_character_war = { subtract = 25 } +} + +#Adventurers: + +adventure_progress_chance_svalue = { + value = 30 + if = { + limit = { + exists = scope:inspiration_owner.involved_activity.var:adventure_distance + scope:inspiration_owner.involved_activity.var:adventure_distance = short_adventure_var + } + subtract = 5 + } + else_if = { + limit = { + exists = scope:inspiration_owner.involved_activity.var:adventure_distance + scope:inspiration_owner.involved_activity.var:adventure_distance = medium_adventure_var + } + subtract = 10 + } + else_if = { + limit = { + exists = scope:inspiration_owner.involved_activity.var:adventure_distance + scope:inspiration_owner.involved_activity.var:adventure_distance = long_adventure_var + } + subtract = 15 + } + else_if = { + limit = { + exists = scope:inspiration_owner.involved_activity.var:adventure_distance + scope:inspiration_owner.involved_activity.var:adventure_distance = very_long_adventure_var + } + subtract = 20 + } + multiply = { + value = scope:inspiration_owner.adventure_inspiration_average_skill_value + divide = 10 + min = 1 + } +} + +#TOUR Values + +activity_tour_maximum_stop_value = 10 +activity_tour_high_stop_value = 8 +activity_tour_low_stop_value = 5 +activity_tour_minimum_stop_value = 3 + +tour_level_5_prestige_reward = { + value = 1000 + if = { + limit = { + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + multiply = 0.5 + } +} +tour_level_4_prestige_reward = { + value = 700 + if = { + limit = { + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + multiply = 0.5 + } +} +tour_level_3_prestige_reward = { + value = 500 + if = { + limit = { + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + multiply = 0.5 + } +} +tour_level_2_prestige_reward = { + value = 300 + if = { + limit = { + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + multiply = 0.5 + } +} +tour_level_1_prestige_reward = { + value = 100 + if = { + limit = { + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + multiply = 0.5 + } +} + +achievement_imperial_march_achievement_powerful_vassal_tally_value = { + value = 0 + scope:host = { + every_powerful_vassal = { + limit = { highest_held_title_tier >= tier_county } + add = 1 + } + } + min = 1 +} + +# To be used in activity script files where we weight which characters from your court get added to your entourage +standard_travel_entourage_additions = { + value = 0 + if = { + limit = { is_available = no } + add = -1000 + } + if = { + limit = { + scope:owner = { employs_court_position = bodyguard_court_position } + has_court_position = bodyguard_court_position + } + add = 500 + } + if = { + limit = { + scope:owner = { employs_court_position = akolouthos_court_position } + has_court_position = akolouthos_court_position + } + add = 500 + } + if = { + limit = { + scope:owner = { employs_court_position = court_physician_court_position } + has_court_position = court_physician_court_position + } + add = 500 + } + if = { + limit = { + bannable_serving_diarch_trigger = yes + } + subtract = 10000 + } +} + +# Activity Cost Scaling Multipliers +# use as multiply = activity_cost_scale_by_XXX +activity_cost_scale_by_era = { + value = 0 + if = { + limit = { + exists = culture + } + culture = { + if = { + limit = { + has_cultural_era_or_later = culture_era_late_medieval + } + add = 3 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_high_medieval + } + add = 1.5 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_early_medieval + } + add = 1 + } + else = { + add = 0.75 + } + } + } +} + +activity_cost_scale_by_tier = { + value = 0 + if = { + limit = { exists = root.primary_title } + add = { + value = root.primary_title.tier + subtract = 1 + } + } + min = 1 +} + +university_visit_activity_cost_scale_by_tier = { + value = 0 + if = { + limit = { exists = root.primary_title } + add = { + value = root.primary_title.tier + subtract = 1 + multiply = 0.5 + } + } + min = 1 +} + +gruesome_festival_option_small = { + value = 15 + add = { + value = 15 + multiply = activity_cost_scale_by_era + subtract = 15 + desc = activity_cost_scale_by_era_desc + } + add = { + value = 15 + multiply = activity_cost_scale_by_tier + subtract = 15 + desc = activity_cost_scale_by_tier_desc + } +} + +gruesome_festival_option_medium = { + value = 40 + add = { + value = 40 + multiply = activity_cost_scale_by_era + subtract = 40 + desc = activity_cost_scale_by_era_desc + } + add = { + value = 40 + multiply = activity_cost_scale_by_tier + subtract = 40 + desc = activity_cost_scale_by_tier_desc + } +} + +gruesome_festival_option_large = { + value = 120 + add = { + value = 120 + multiply = activity_cost_scale_by_era + subtract = 120 + desc = activity_cost_scale_by_era_desc + } + add = { + value = 120 + multiply = activity_cost_scale_by_tier + subtract = 120 + desc = activity_cost_scale_by_tier_desc + } +} + +### UNIVERSITY VISIT STUFF + +adult_education_activity_cost = { + value = root.major_gold_value_static_max + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + } + multiply = 0.5 + } +} + +###################### +# FUNERAL STUFF +###################### +standard_funeral_cooldown_time = { + value = 5 +} + +min_funeral_event_spacing = 10 +max_funeral_event_spacing = 15 + +funeral_activity_cost = { + value = 0 + add = standard_activity_base_cost +} + +funeral_normal_option_cost = { + value = 10 + multiply = activity_cost_scale_by_tier + multiply = activity_cost_scale_by_era +} + +funeral_good_option_cost = { + value = 35 + multiply = activity_cost_scale_by_tier + multiply = activity_cost_scale_by_era +} + +funeral_activity_cost_discount_max = { + value = 0.5 +} +funeral_activity_cost_increase_max = { + value = 1.5 +} +funeral_activity_cost_discount_max_value = { + value = funeral_activity_cost_discount_max + subtract = 1 +} +funeral_activity_cost_discount_medium = { + value = 0.7 +} +funeral_activity_cost_discount_medium_value = { + value = funeral_activity_cost_discount_medium + subtract = 1 +} +funeral_activity_cost_discount_min = { + value = 0.9 +} +funeral_activity_cost_discount_min_value = { + value = funeral_activity_cost_discount_min + subtract = 1 +} + +funeral_end_piety_gain = { + value = 150 + if = { + limit = { + scope:activity = { + has_activity_option = { + category = funeral_option_ceremony + option = funeral_ceremony_bad + } + } + } + add = 50 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = funeral_option_ceremony + option = funeral_ceremony_normal + } + } + } + add = 100 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = funeral_option_ceremony + option = funeral_ceremony_good + } + } + } + add = 200 + } + if = { + limit = { + scope:activity = { + activity_location = { + barony = { + is_holy_site_of = scope:host.faith + } + has_holy_building = yes + } + } + } + add = 50 + } + if = { + limit = { + scope:activity = { + activity_location = { + barony = { + is_holy_site_of = scope:host.faith + } + } + } + } + add = 50 + } + if = { + limit = { + scope:activity = { + activity_location = { + has_building_or_higher = tower_of_silence_01 + } + } + } + add = 50 + } + if = { + limit = { + scope:activity = { + activity_location = { + scope:host.faith = { has_doctrine_parameter = sky_burials_active } + is_mountainous_trigger = yes + } + } + } + add = 50 + } + if = { + limit = { + scope:activity = { + activity_location = { + has_building_or_higher = temple_01 + faith.religion = scope:host.faith.religion + } + } + } + add = 50 + } + multiply = funeral_end_piety_multiplier +} + +funeral_end_piety_multiplier = { + value = 1 + if = { + limit = { + scope:host.faith = { + has_doctrine_parameter = mummification_funeral + } + } + value = 0.1 + } + if = { + limit = { + scope:host.faith = { + has_doctrine_parameter = stoic_funeral + } + } + value = 1.25 + } +} + +funeral_end_stress_loss = { + value = -10 + if = { + limit = { + scope:activity = { + has_activity_option = { + category = funeral_option_ceremony + option = funeral_ceremony_bad + } + } + } + add = -10 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = funeral_option_ceremony + option = funeral_ceremony_normal + } + } + } + add = -25 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = funeral_option_ceremony + option = funeral_ceremony_good + } + } + } + add = -50 + } + multiply = funeral_end_stress_multiplier +} + +funeral_end_stress_multiplier = { + value = 1 + if = { + limit = { + scope:host.faith = { + has_doctrine_parameter = stoic_funeral + } + } + value = 0.5 + } + if = { + limit = { + scope:host.faith = { + has_doctrine_parameter = bewailment_funeral + } + } + value = 2 + } +} + +funeral_end_legitimacy_gain = { + if = { + limit = { + scope:activity = { + has_activity_option = { + category = funeral_option_ceremony + option = funeral_ceremony_bad + } + } + } + value = miniscule_legitimacy_gain + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = funeral_option_ceremony + option = funeral_ceremony_normal + } + } + } + value = minor_legitimacy_gain + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = funeral_option_ceremony + option = funeral_ceremony_good + } + } + } + value = medium_legitimacy_gain + } + if = { + limit = { + scope:activity = { + activity_location = { + barony = { + is_holy_site_of = scope:host.faith + } + has_holy_building = yes + } + } + } + add = 10 + } + if = { + limit = { + scope:activity = { + activity_location = { + barony = { + is_holy_site_of = scope:host.faith + } + } + } + } + add = 10 + } + if = { + limit = { + scope:activity = { + activity_location = { + has_building_or_higher = tower_of_silence_01 + } + } + } + add = 10 + } + if = { + limit = { + scope:activity = { + activity_location = { + scope:host.faith = { has_doctrine_parameter = sky_burials_active } + is_mountainous_trigger = yes + } + } + } + add = 10 + } + if = { + limit = { + scope:activity = { + activity_location = { + has_building_or_higher = temple_01 + faith.religion = scope:host.faith.religion + } + } + } + add = 10 + } +} + +### CAMP PARTY STUFF +standard_camp_party_cooldown_time = { + value = 2 + if = { + limit = { + root.culture = { + has_cultural_parameter = more_frequent_feasts + } + } + multiply = 0.5 + } +} +standard_camp_party_activity_cost = { + value = 15 +} + +########### +# ROAMING # +########### +standard_roaming_activity_cost = { + value = 25 + multiply = { + value = root.primary_title.tier + subtract = 1 + min = 1 + } + if = { + limit = { + root.primary_title.tier > tier_duchy + } + add = 25 + } + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + } + multiply = 0.5 + } +} + +roaming_province_reference_value = { + value = 0 + if = { + limit = { + has_province_modifier = wayfarer_astronomical_phenomenon + } + add = 45 + } + # TERRAIN + if = { + limit = { + OR = { + terrain = desert_mountains + terrain = mountains + } + } + add = 30 + } + if = { + limit = { + OR = { + terrain = desert + terrain = oasis + terrain = hills + terrain = taiga + terrain = forest + terrain = jungle + } + } + add = 15 + } + # POPULATION + if = { + limit = { has_holding = no } + add = 15 + } +} + +roaming_outro_stress_loss_value = { + value = 0 + if = { + limit = { + has_character_flag = roaming_weak_stress_loss + } + add = -15 + } + if = { + limit = { + has_character_flag = roaming_medium_stress_loss + } + add = -20 + } + if = { + limit = { + has_character_flag = roaming_strong_stress_loss + } + add = -25 + } + if = { + limit = { + has_character_flag = roaming_very_strong_stress_loss + } + add = -30 + } +} + +roaming_reward_multiplier_value = { + value = 1 + if = { + limit = { + exists = scope:activity + scope:activity = { has_activity_type = activity_roaming } + } + scope:activity.activity_location = { + if = { + limit = { + has_holding = no + } + add = 0.1 + } + if = { + limit = { + OR = { + terrain = desert_mountains + terrain = mountains + } + } + add = 0.3 + } + else_if = { + limit = { + OR = { + terrain = desert + terrain = oasis + terrain = hills + terrain = taiga + terrain = forest + terrain = jungle + } + } + add = 0.2 + } + if = { + limit = { + OR = { + has_province_modifier = inspection_hidden_hinterlands_recruit_modifier + has_province_modifier = inspection_hidden_hinterlands_hunters_modifier + } + } + multiply = 1.25 + } + } + } +} + +roaming_reward_fame_multiplier_value = { + value = 1 + if = { + limit = { + has_activity_intent = roaming_storyteller_intent + } + add = 0.2 + } +} + +roaming_reward_fame_very_small = { + value = 20 + multiply = roaming_reward_multiplier_value + multiply = roaming_reward_fame_multiplier_value +} + +roaming_reward_fame_small = { + value = 40 + multiply = roaming_reward_multiplier_value + multiply = roaming_reward_fame_multiplier_value +} + +roaming_reward_fame_medium = { + value = 60 + multiply = roaming_reward_multiplier_value + multiply = roaming_reward_fame_multiplier_value +} + +roaming_reward_fame_high = { + value = 80 + multiply = roaming_reward_multiplier_value + multiply = roaming_reward_fame_multiplier_value +} + +roaming_reward_fame_very_high = { + value = 125 + multiply = roaming_reward_multiplier_value + multiply = roaming_reward_fame_multiplier_value +} + +roaming_reward_fame_legendary = { + value = 200 + multiply = roaming_reward_multiplier_value + multiply = roaming_reward_fame_multiplier_value +} + +roaming_apa_fame_chance_value = { + value = 25 + scope:host = { + if = { + limit = { + has_activity_intent = roaming_storyteller_intent + } + multiply = 1.5 + } + } +} +roaming_apa_stress_chance_value = { + value = 10 + scope:host = { + if = { + limit = { + has_activity_intent = reduce_stress_intent + } + multiply = 1.5 + } + } +} +roaming_apa_gold_chance_value = 15 +roaming_apa_rare_chance_value = 2 + +roaming_mystic_chance_value = { + value = 25 + if = { + limit = { + OR = { + has_trait = lifestyle_mystic + has_activity_intent = roaming_mystic_intent + } + } + value = 50 + } +} + +roaming_test_value = { + value = scope:fame_value +} + +########### +# JOURNEY # +########### +standard_journey_activity_cost = { + value = 10 + multiply = { + value = root.primary_title.tier + subtract = 1 + min = 1 + } + if = { + limit = { + root.primary_title.tier > tier_duchy + } + add = 25 + } + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + } + multiply = 0.5 + } +} + +journey_province_reference_value = { + value = 0 + if = { + limit = { + exists = county.holder + scope:host = { in_diplomatic_range = root.county.holder } + trigger_if = { + limit = { + exists = county.holder.liege + } + scope:host = { in_diplomatic_range = root.county.holder.liege } + } + } + add = { + value = county.development_level + divide = 2 + } + if = { + limit = { + "scope:host.capital_province.squared_distance(root)" <= squared_distance_small + } + add = 50 + } + if = { + limit = { + "scope:host.capital_province.squared_distance(root)" > squared_distance_small + "scope:host.capital_province.squared_distance(root)" <= squared_distance_medium + } + add = 40 + } + if = { + limit = { + "scope:host.capital_province.squared_distance(root)" > squared_distance_medium + "scope:host.capital_province.squared_distance(root)" <= squared_distance_large + } + add = 30 + } + if = { + limit = { + "scope:host.capital_province.squared_distance(root)" > squared_distance_large + "scope:host.capital_province.squared_distance(root)" <= squared_distance_huge + } + add = 20 + } + if = { + limit = { + "scope:host.capital_province.squared_distance(root)" > squared_distance_huge + "scope:host.capital_province.squared_distance(root)" <= squared_distance_almost_massive + } + add = 10 + } + if = { + limit = { + "scope:host.capital_province.squared_distance(root)" > squared_distance_almost_massive + } + add = -10 + } + if = { + limit = { + has_travel_point_of_interest = poi_special_buildings_wonder + } + add = 40 + } + if = { + limit = { + has_travel_point_of_interest = poi_special_buildings_martial + } + add = 25 + } + if = { + limit = { + has_travel_point_of_interest = poi_special_buildings_learning + } + add = 25 + } + if = { + limit = { + has_travel_point_of_interest = poi_special_buildings_religious + } + add = 25 + } + if = { + limit = { + has_travel_point_of_interest = poi_special_buildings_diplomatic + } + add = 25 + } + if = { + limit = { + has_travel_point_of_interest = poi_special_buildings_economic + } + add = 25 + } + } + if = { + limit = { + scope:host = { + has_variable_list = extra_journey_target + is_target_in_variable_list = { + name = extra_journey_target + target = root + } + } + } + add = 100 + } + if = { + limit = { + OR = { + has_province_modifier = inspection_proteted_poi_levy_modifier + has_province_modifier = inspection_protected_holy_poi_levy_modifier + has_province_modifier = inspection_protected_poi_gold_modifier + has_province_modifier = inspection_protected_holy_poi_gold_modifier + } + } + add = 25 + } + if = { + limit = { + OR = { + NOT = { scope:host = { has_variable_list = extra_journey_target } } + AND = { + scope:host = { has_variable_list = extra_journey_target } + NOT = { + scope:host = { + is_target_in_variable_list = { + name = extra_journey_target + target = root + } + } + } + } + } + OR = { + NOT = { exists = root.county.holder } + NOT = { + scope:host = { in_diplomatic_range = root.county.holder } + } + AND = { + exists = root.county.holder.liege + NOT = { + scope:host = { + in_diplomatic_range = root.county.holder.liege + } + } + } + } + } + multiply = 0 + } + if = { + limit = { + scope:host = { + has_variable_list = visited_monument_exploration + is_target_in_variable_list = { + name = visited_monument_exploration + target = root + } + } + } + multiply = 0 + } +} + +journey_inspired_journey_costs_value = { + value = 1 + if = { + limit = { + inspired_journey_value_trigger = yes + } + multiply = 0.5 + } +} + +########## +# SURVEY # +########## +standard_survey_activity_cost = { + value = 50 + if = { + limit = { + root.primary_title.tier > tier_duchy + } + add = 25 + } + multiply = { + value = root.primary_title.tier + subtract = 1 + min = 1 + divide = 2 + min = 1 + } + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + } + multiply = 0.5 + } +} + +survey_province_reference_value = { + value = 0 + if = { + limit = { + county = { + any_neighboring_county = { + exists = holder + NOT = { holder.top_liege = root.county.holder.top_liege } + } + } + } + add = 50 + } + else_if = { + limit = { + scope:host = { is_independent_ruler = no } + county = { + any_neighboring_county = { + exists = holder + holder.top_liege = root.county.holder.top_liege + NOT = { + holder = { + OR = { + is_vassal_of = scope:host + this = scope:host + } + } + } + } + } + } + add = 25 + } + add = { + value = 100 + subtract = county.county_control + } + if = { + limit = { + OR = { + this = scope:host.capital_province + is_county_capital = no + } + } + multiply = 0 + } +} + +inspection_success_chance_value = { + if = { + limit = { + activity_host = { is_ai = no } + activity_location = { has_province_modifier = inspection_second_try_modifier } + } + add = { + value = 10 + desc = inspection_success_chance.second_try_modifier + } + } + activity_host = { + if = { + limit = { + has_activity_intent = survey_overseer_intent + } + add = { + value = 10 + desc = survey_overseer_intent + } + } + add = { + value = stewardship + divide = 3 + ceiling = yes + max = 10 + desc = stewardship_modifier + } + add = { + value = learning + divide = 3 + ceiling = yes + max = 10 + desc = learning_modifier + } + add = { + value = diplomacy + divide = 3 + ceiling = yes + max = 10 + desc = diplomacy_modifier + } + add = { + value = intrigue + divide = 3 + ceiling = yes + max = 10 + desc = intrigue_modifier + } + if = { + limit = { + has_trait = overseer + } + add = { + value = 4 + desc = trait_overseer + } + } + if = { + limit = { + has_trait = administrator + } + add = { + value = 4 + desc = trait_administrator + } + } + if = { + limit = { + has_trait = lifestyle_surveyor + } + add = { + value = 4 + desc = trait_lifestyle_surveyor + } + } + } + activity_location = { + add = { + value = 100 + subtract = { + value = county.county_control + max = 100 # In-case they have 'Absolute Control', which seems to be more than 100 + } + divide = 5 + desc = county_control_modifier + } + if = { + limit = { + county = { + any_neighboring_county = { + exists = holder + NOT = { holder.top_liege = prev.holder.top_liege } + } + } + } + add = { + value = 10 + desc = borderlands_modifier + } + } + } + # EVENTS + if = { + limit = { exists = var:inspection_success_chance_event } + add = { + value = var:inspection_success_chance_event + desc = inspection_success_chance.events + } + } + min = 5 + max = 95 +} + +survey_province_development_info_value = { value = root.location.county.development_level } +survey_province_control_info_value = { value = root.location.county.county_control } +survey_province_tax_info_value = { value = root.location.monthly_income } +survey_province_levy_info_value = { value = root.location.building_levies } +survey_province_popular_opinion_info_value = { value = root.location.county.county_opinion } + +inspection_activity_success_increase_medium_value = 10 +inspection_activity_success_increase_minor_value = 5 +inspection_activity_success_increase_miniscule_value = 2 +inspection_activity_success_decrease_miniscule_value = -2 +inspection_activity_success_decrease_minor_value = -5 +inspection_activity_success_decrease_medium_value = -10 + +inspection_value_old_roads_scale = { + value = 30 + subtract = development_level + divide = 3 + floor = yes + + min = 0 + max = 10 + desc = MODIFIER_DEFINITION_OLD_ROADS_DESC +} + +inspection_expanding_walls_new_scale = { + add = free_building_slots + + min = 1 + max = 5 + DESC = MODIFIER_DEFINITION_EXPANDING_WALLS_NEW_DESC +} + +inspection_expanding_walls_old_scale = { + add = num_buildings + if = { + limit = { + has_special_building = yes + } + add = 1 + } + + min = 1 + max = 10 + DESC = MODIFIER_DEFINITION_EXPANDING_WALLS_OLD_DESC +} + +inspection_minor_gold = { + value = minor_gold_value + multiply = inspection_activity_option_multiplier +} + +inspection_medium_gold = { + value = medium_gold_value + multiply = inspection_activity_option_multiplier +} + +inspection_activity_option_multiplier = { + value = 1 + if = { + limit = { + scope:activity = { + has_activity_option = { + category = inspection_option_allocated_funds + option = inspection_large_fund + } + } + } + multiply = 0.6 + } + else_if = { + limit = { + scope:activity = { + has_activity_option = { + category = inspection_option_allocated_funds + option = inspection_small_fund + } + } + } + multiply = 0.8 + } +} + + diff --git a/common/script_values/00_ai_values.txt b/common/script_values/00_ai_values.txt new file mode 100644 index 00000000..67ff0bf0 --- /dev/null +++ b/common/script_values/00_ai_values.txt @@ -0,0 +1,2308 @@ +#CONTENT +#Ai value values +#Trait compatibility thresholds +#Ai value divergence thresholds +#Ai value inverse +#Retired values + +################### +# Ai value values # +################### + +# ai_honor 45 +# ai_zeal 28 +# ai_greed 24 +# ai_compassion 27 +# ai_boldness 42 +# ai_rationality 59 +# ai_vengefulness 28 +# ai_energy 84 +# ai_sociability 43 + +very_low_positive_ai_value = 10 +low_positive_ai_value = 20 +medium_positive_ai_value = 35 +high_positive_ai_value = 50 +very_high_positive_ai_value = 75 +dominant_positive_ai_value = 200 + +very_low_negative_ai_value = -10 +low_negative_ai_value = -20 +medium_negative_ai_value = -35 +high_negative_ai_value = -50 +very_high_negative_ai_value = -75 +dominant_negative_ai_value = -200 + +####################### +# trait compatibility # +####################### + +#These values are balanced based on samples taken 2018-11-13. The data is found in the spreadsheet "Ai value divergence & trait compatibility" on the drive. +#Note that they're balanced for adults only. + +high_negative_trait_compatibility = -31 #About 8% of characters will have compatibility below this value for average character +medium_negative_trait_compatibility = -16 #About 21% of characters will have compatibility below this value for average character +low_negative_trait_compatibility = -1 #About 43% of characters will have compatibility below this value for average character +neutral_trait_compatibility = 0 # ~20% of chars are neutral towards average character +low_positive_trait_compatibility = 1 # ~38% of chars has compatibility over this value for average character +medium_positive_trait_compatibility = 11 # ~21% of chars has compatibility over this value for average character +high_positive_trait_compatibility = 26 # ~8% of char has compatibility over this value for average character + + + +######################## +# ai_values_divergence # +######################## + +#These are balanced based on samples taken the 2018-03-28. The data is found in the spreadsheet "Ai value divergence" on the drive. +#The values are only intended to be used for adults. Note that they + +very_low_ai_values_divergence = 150 #About 10% (>1 to 24%) of character will be at or below this value for the average character. +low_ai_values_divergence = 200 #About 30% (3-57%) of characters will be at or below this value for the average character +medium_ai_values_divergence = 250 #About 52% (10-85%) of characters will be at or below this value for the average character +high_ai_values_divergence = 300 #About 71% (24-85%) of characters will be at or below this value for the average character +very_high_ai_values_divergence = 350 #About 85% (46-98%) of characters will be at or below this value for the average character +#Percentages in parentheses are the observed spans + +#################### +# Ai value inverse # +#################### + +high_positive_ai_value_inverse = { + value = 1 + divide = high_positive_ai_value +} + +high_negative_ai_value_inverse = { + value = 1 + divide = high_negative_ai_value +} + + + + + + + + + + + + + + + + +########### +# retired # +########### + +###################### +# ai_value_modifiers # +###################### + +#For a character with a "high" ai value (see above), the product of ai_value * modifier_scripted_value should be: +#High = 400 +#Medium = 200 +#Low = 100 +#Tiny = 50 + +#Example: high positive ai value is 40. As high should return the product 400, the high_chance_impact_positive_ai_value should be 10. + +high_chance_impact_positive_ai_value = 10 +medium_chance_impact_positive_ai_value = 5 +low_chance_impact_positive_ai_value = 2.5 +tiny_chance_impact_positive_ai_value = 1.25 + +high_chance_impact_negative_ai_value = -10 +medium_chance_impact_negative_ai_value = -5 +low_chance_impact_negative_ai_value = -2.5 +tiny_chance_impact_negative_ai_value = -1.25 + + +################# +# old ai values # +################# +#Base: +#max: having the top 3 personality traits +#high: having the top 1 (not 100) +#medium: having the top 2nd highest (or slightly higher if traits with this ai value is common) +#low: 10/15/20 (depending on how common it is, this level should be quite common) + + +#ai_boldness +max_positive_boldness = 100 #brave (50) + ambitious (25) + fickle (25) +high_positive_boldness = 50 #brave +medium_positive_boldness = 25 #ambitious etc. +low_positive_boldness = 10 #gregarious etc. +max_negative_boldness = -100 #craven (-50) + calm (-25) + content (25) +high_negative_boldness = -50 #craven +medium_negative_boldness = -25 #content etc. +low_negative_boldness = -10 #patient etc. + +#ai_compassion +max_positive_compassion = 100 #compassionate (40) + generous (25) + forgiving (20) +high_positive_compassion = 40 #compassionate +medium_positive_compassion = 25 #generous +low_positive_compassion = 10 #trusting/humble +max_negative_compassion = -100 #sadistic (-100) +high_negative_compassion = -40 #callous +medium_negative_compassion = -25 #greedy (-20) + one of the 7 traits between -5 and -15 +low_negative_compassion = -15 #wrathful, arrogant etc. + +#ai_greed +max_positive_greed = 100 #ambitious (50) + greedy (50) +high_positive_greed = 50 #ambitious/greedy +medium_positive_greed = 20 #gluttonous +low_positive_greed = 10 #lustful/lazy +max_negative_greed = -100 #generous (-50) + content (-25) + compassionate (-25) +high_negative_greed = -50 #generous +medium_negative_greed = -25 #content/compassionate/humble +low_negative_greed = -10 #chaste or temperate (-20), all other are -25 or less + +#ai_energy +max_positive_energy = 95 #diligent (50), brave (50) +high_positive_energy = 50 #diligent +medium_positive_energy = 25 #brave +low_positive_energy = 15 #there are a 7 traits adding 10 and one 5 +max_negative_energy = -100 #content (-50), lazy (-50) +high_negative_energy = -50 #content +medium_negative_energy = -25 #craven +low_negative_energy = -10 #4 traits using -10 + +#ai_honor +max_positive_honor = 100 #just (50) + honest (25) + compassionate (25) +high_positive_honor = 50 #just +medium_positive_honor = 25 #honest/compassionate +low_positive_honor = 10 #generous, humble etc. 5 different traits +max_negative_honor = -100 #sadistic (-100) +high_negative_honor = -50 #arbitrary +medium_negative_honor = -25 #callous/deceitful +low_negative_honor = -10 #greedy/arrogant etc. 6 different traits + +#ai_rationality +max_positive_rationality = 45 #cynical (20) + calm (15) + patient (10) +high_positive_rationality = 20 #cynical +medium_positive_rationality = 15 #calm (15) +low_positive_rationality = 10 #patient etc. 4 different traits +max_negative_rationality = -65 #fickle (-30) + zealous (-20) + wrathful (-15) +high_negative_rationality = -30 #fickle +medium_negative_rationality = -20 #zealous +low_negative_rationality = -10 #impatient etc. 6 different traits +#There are a lot of lifestyle/physical traits which have big impacts on rationality. Maybe throw the intellect_good_3 +30 and the intellect_bad_3 -30 into the list as the highest ranking traits? Especially important for the positive rationality, as many characters will become more rational with age (if progressing in a lifestyle) + +#ai_vengefulness +max_positive_vengefulness = 90 #vengeful (50) + stubborn (30) + patient (10) +high_positive_vengefulness = 50 #vengeful +medium_positive_vengefulness = 20 #lowered to 20 so there are more ways to get above it than having vengeful or stubborn +low_positive_vengefulness = 10 #patient/paranoid +max_negative_vengefulness = -100 #forgiving (-50) + fickle (-30) + impatient (-10) +high_negative_vengefulness = -50 +medium_negative_vengefulness = -30 +low_negative_vengefulness = -10 +#Note: there are very few traits which adjust vengefulness + +#ai_zeal +max_positive_zeal = 85 #zealous (50), just (25), chaste (10) +high_positive_zeal = 50 #zealous +medium_positive_zeal = 25 #just +low_positive_zeal = 10 #ambitious +max_negative_zeal = -85 #cynical (-50), arbitrary (-25), lustful (-10) +high_negative_zeal = -50 #cynical +medium_negative_zeal = -25 #arbirary +low_negative_zeal = -10 #lustful +#There are a lot of other religious traits which have an impact, look at them? + +#ai_boldness: +high_chance_impact_positive_boldness = 8 +medium_chance_impact_positive_boldness = 4 +low_chance_impact_positive_boldness = 2 +high_chance_impact_negative_boldness = -8 +medium_chance_impact_negative_boldness = -4 +low_chance_impact_negative_boldness = -2 +#ai_compassion: +high_chance_impact_positive_compassion = 8 +medium_chance_impact_positive_compassion = 4 +low_chance_impact_positive_compassion = 2 +high_chance_impact_negative_compassion = -8 +medium_chance_impact_negative_compassion = -4 +low_chance_impact_negative_compassion = -2 +#ai_greed: +high_chance_impact_positive_greed = 8 +medium_chance_impact_positive_greed = 4 +low_chance_impact_positive_greed = 2 +high_chance_impact_negative_greed = -8 +medium_chance_impact_negative_greed = -4 +low_chance_impact_negative_greed = -2 +#ai_energy: +high_chance_impact_positive_energy = 8 +medium_chance_impact_positive_energy = 4 +low_chance_impact_positive_energy = 2 +high_chance_impact_negative_energy = -8 +medium_chance_impact_negative_energy = -4 +low_chance_impact_negative_energy = -2 +#ai_honor: +high_chance_impact_positive_honor = 8 +medium_chance_impact_positive_honor = 4 +low_chance_impact_positive_honor = 2 +high_chance_impact_negative_honor = -8 +medium_chance_impact_negative_honor = -4 +low_chance_impact_negative_honor = -2 +#ai_rationality: +high_chance_impact_positive_rationality = 8 +medium_chance_impact_positive_rationality = 4 +low_chance_impact_positive_rationality = 2 +high_chance_impact_negative_rationality = -8 +medium_chance_impact_negative_rationality = -4 +low_chance_impact_negative_rationality = -2 +#ai_vengefulness: +high_chance_impact_positive_vengefulness = 8 +medium_chance_impact_positive_vengefulness = 4 +low_chance_impact_positive_vengefulness = 2 +high_chance_impact_negative_vengefulness = -8 +medium_chance_impact_negative_vengefulness = -4 +low_chance_impact_negative_vengefulness = -2 +#ai_zeal: +high_chance_impact_positive_zeal = 8 +medium_chance_impact_positive_zeal = 4 +low_chance_impact_positive_zeal = 2 +high_chance_impact_negative_zeal = -8 +medium_chance_impact_negative_zeal = -4 +low_chance_impact_negative_zeal = -2 + +halved_faction_power_threshold = { + value = faction_power_threshold + multiply = 0.5 +} + +# Budgets + +ai_war_chest_gold_minus_100 = { + value = war_chest_gold + add = -100 + min = 1 +} + +halved_ai_war_chest_gold = { + value = war_chest_gold + multiply = 0.5 +} + +excess_over_halved_ai_war_chest_gold = { + value = war_chest_gold + subtract = halved_ai_war_chest_gold_maximum +} + +halved_ai_war_chest_gold_maximum = { + value = war_chest_gold_maximum + multiply = 0.5 +} + +quarter_ai_war_chest_gold = { + value = war_chest_gold + multiply = 0.25 +} + +excess_over_a_quarter_ai_war_chest_gold = { + value = war_chest_gold + subtract = quarter_ai_war_chest_gold_maximum +} + +quarter_ai_war_chest_gold_maximum = { + value = war_chest_gold_maximum + multiply = 0.25 +} + +cautious_ai_minimum_war_chest_gold = { + value = 50 + if = { + limit = { + highest_held_title_tier = tier_duchy + } + add = 100 + } + else_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + add = 200 + } + else_if = { + limit = { + highest_held_title_tier = tier_empire + } + add = 300 + } + max = war_chest_gold_maximum +} + +excess_over_cautious_ai_minimum_war_chest_gold = { + value = war_chest_gold + subtract = cautious_ai_minimum_war_chest_gold +} + +conqueror_safe_spending_gold = { # Conquerors generally want to keep more gold than their war chest maximum around, so they can wage more & longer wars + value = war_chest_gold_maximum + multiply = 2 +} + +# Calc rough opinion values. +calc_rough_liege_opinion_value = { + if = { + limit = { + opinion = { + target = liege + value >= 95 + } + } + add = 100 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 90 + } + } + add = 95 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 85 + } + } + add = 90 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 80 + } + } + add = 85 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 75 + } + } + add = 80 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 70 + } + } + add = 75 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 65 + } + } + add = 70 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 60 + } + } + add = 65 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 55 + } + } + add = 60 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 50 + } + } + add = 55 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 45 + } + } + add = 50 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 40 + } + } + add = 45 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 35 + } + } + add = 40 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 30 + } + } + add = 35 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 25 + } + } + add = 30 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 20 + } + } + add = 25 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 15 + } + } + add = 20 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 10 + } + } + add = 15 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 5 + } + } + add = 10 + } + else_if = { + limit = { + opinion = { + target = liege + value >= 0 + } + } + add = 5 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -4 + } + } + add = 0 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -5 + } + } + add = -5 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -10 + } + } + add = -10 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -15 + } + } + add = -15 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -20 + } + } + add = -20 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -25 + } + } + add = -25 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -30 + } + } + add = -30 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -35 + } + } + add = -35 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -40 + } + } + add = -40 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -45 + } + } + add = -45 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -50 + } + } + add = -50 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -55 + } + } + add = -55 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -60 + } + } + add = -60 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -65 + } + } + add = -65 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -70 + } + } + add = -70 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -75 + } + } + add = -75 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -80 + } + } + add = -80 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -85 + } + } + add = -85 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -90 + } + } + add = -90 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -95 + } + } + add = -95 + } + else_if = { + limit = { + opinion = { + target = liege + value >= -100 + } + } + add = -100 + } +} +calc_rough_root_opinion_value = { + if = { + limit = { + opinion = { + target = root + value >= 95 + } + } + add = 100 + } + else_if = { + limit = { + opinion = { + target = root + value >= 90 + } + } + add = 95 + } + else_if = { + limit = { + opinion = { + target = root + value >= 85 + } + } + add = 90 + } + else_if = { + limit = { + opinion = { + target = root + value >= 80 + } + } + add = 85 + } + else_if = { + limit = { + opinion = { + target = root + value >= 75 + } + } + add = 80 + } + else_if = { + limit = { + opinion = { + target = root + value >= 70 + } + } + add = 75 + } + else_if = { + limit = { + opinion = { + target = root + value >= 65 + } + } + add = 70 + } + else_if = { + limit = { + opinion = { + target = root + value >= 60 + } + } + add = 65 + } + else_if = { + limit = { + opinion = { + target = root + value >= 55 + } + } + add = 60 + } + else_if = { + limit = { + opinion = { + target = root + value >= 50 + } + } + add = 55 + } + else_if = { + limit = { + opinion = { + target = root + value >= 45 + } + } + add = 50 + } + else_if = { + limit = { + opinion = { + target = root + value >= 40 + } + } + add = 45 + } + else_if = { + limit = { + opinion = { + target = root + value >= 35 + } + } + add = 40 + } + else_if = { + limit = { + opinion = { + target = root + value >= 30 + } + } + add = 35 + } + else_if = { + limit = { + opinion = { + target = root + value >= 25 + } + } + add = 30 + } + else_if = { + limit = { + opinion = { + target = root + value >= 20 + } + } + add = 25 + } + else_if = { + limit = { + opinion = { + target = root + value >= 15 + } + } + add = 20 + } + else_if = { + limit = { + opinion = { + target = root + value >= 10 + } + } + add = 15 + } + else_if = { + limit = { + opinion = { + target = root + value >= 5 + } + } + add = 10 + } + else_if = { + limit = { + opinion = { + target = root + value >= 0 + } + } + add = 5 + } + else_if = { + limit = { + opinion = { + target = root + value >= -4 + } + } + add = 0 + } + else_if = { + limit = { + opinion = { + target = root + value >= -5 + } + } + add = -5 + } + else_if = { + limit = { + opinion = { + target = root + value >= -10 + } + } + add = -10 + } + else_if = { + limit = { + opinion = { + target = root + value >= -15 + } + } + add = -15 + } + else_if = { + limit = { + opinion = { + target = root + value >= -20 + } + } + add = -20 + } + else_if = { + limit = { + opinion = { + target = root + value >= -25 + } + } + add = -25 + } + else_if = { + limit = { + opinion = { + target = root + value >= -30 + } + } + add = -30 + } + else_if = { + limit = { + opinion = { + target = root + value >= -35 + } + } + add = -35 + } + else_if = { + limit = { + opinion = { + target = root + value >= -40 + } + } + add = -40 + } + else_if = { + limit = { + opinion = { + target = root + value >= -45 + } + } + add = -45 + } + else_if = { + limit = { + opinion = { + target = root + value >= -50 + } + } + add = -50 + } + else_if = { + limit = { + opinion = { + target = root + value >= -55 + } + } + add = -55 + } + else_if = { + limit = { + opinion = { + target = root + value >= -60 + } + } + add = -60 + } + else_if = { + limit = { + opinion = { + target = root + value >= -65 + } + } + add = -65 + } + else_if = { + limit = { + opinion = { + target = root + value >= -70 + } + } + add = -70 + } + else_if = { + limit = { + opinion = { + target = root + value >= -75 + } + } + add = -75 + } + else_if = { + limit = { + opinion = { + target = root + value >= -80 + } + } + add = -80 + } + else_if = { + limit = { + opinion = { + target = root + value >= -85 + } + } + add = -85 + } + else_if = { + limit = { + opinion = { + target = root + value >= -90 + } + } + add = -90 + } + else_if = { + limit = { + opinion = { + target = root + value >= -95 + } + } + add = -95 + } + else_if = { + limit = { + opinion = { + target = root + value >= -100 + } + } + add = -100 + } +} +calc_rough_opcalc_char_opinion_value = { + if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 95 + } + } + add = 100 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 90 + } + } + add = 95 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 85 + } + } + add = 90 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 80 + } + } + add = 85 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 75 + } + } + add = 80 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 70 + } + } + add = 75 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 65 + } + } + add = 70 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 60 + } + } + add = 65 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 55 + } + } + add = 60 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 50 + } + } + add = 55 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 45 + } + } + add = 50 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 40 + } + } + add = 45 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 35 + } + } + add = 40 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 30 + } + } + add = 35 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 25 + } + } + add = 30 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 20 + } + } + add = 25 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 15 + } + } + add = 20 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 10 + } + } + add = 15 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 5 + } + } + add = 10 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= 0 + } + } + add = 5 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -4 + } + } + add = 0 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -5 + } + } + add = -5 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -10 + } + } + add = -10 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -15 + } + } + add = -15 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -20 + } + } + add = -20 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -25 + } + } + add = -25 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -30 + } + } + add = -30 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -35 + } + } + add = -35 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -40 + } + } + add = -40 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -45 + } + } + add = -45 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -50 + } + } + add = -50 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -55 + } + } + add = -55 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -60 + } + } + add = -60 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -65 + } + } + add = -65 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -70 + } + } + add = -70 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -75 + } + } + add = -75 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -80 + } + } + add = -80 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -85 + } + } + add = -85 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -90 + } + } + add = -90 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -95 + } + } + add = -95 + } + else_if = { + limit = { + opinion = { + target = scope:opcalc_char + value >= -100 + } + } + add = -100 + } +} + +### Brief: ai_men_at_arms_expense_gold_min +# The AI will quickly try to spend this much of its gold income on MAA +# maintenance. This is referenced in code, so do not rename or remove this +# without talking with a programmer about it. +# +# Value between 0 and 1, where 1 eqivalents using 100% of its income on maa +# maintenance. +# +# Scopes: +# root - character +# AI character evaluating the ideal percentile. +# +ai_men_at_arms_expense_gold_min = { + value = { + value = 0.15 + desc = "default value" + } + if = { + limit = { + ai_has_warlike_personality = yes + } + add = { + desc = ai_warlike_personality + value = 0.1 + } + } + if = { + limit = { + ai_has_conqueror_personality = yes + } + add = { + desc = ai_conqueror_personality + value = 0.2 + } + } + if = { + limit = { + ai_has_cautious_personality = yes + } + add = { + desc = ai_cautious_personality + value = 0.1 + } + } + if = { + limit = { + ai_has_economical_boom_personality = yes + } + add = { + desc = ai_economical_boom_personality + value = -0.1 + } + } + if = { + limit = { + has_character_flag = vassal_directive_build_maa + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + add = { + desc = ai_directive + value = 0.5 + } + } + + min = 0 + max = 0.9 +} + +### Brief: ai_men_at_arms_expense_ideal +# The AI will try to spend this much of its gold income on MAA maintenance. It won't +# buy beyond this, but might end up higher due to reduced income. This is +# referenced in code, so do not rename or remove this without talking with a +# programmer about it. +# +# Value between 0 and 1, where 1 eqivalents using 100% of its income on maa +# maintenance. +# +# Scopes: +# root - character +# AI character evaluating the ideal percentile. +# +ai_men_at_arms_expense_gold_ideal = { + value = { + value = 0.4 + desc = "default value" + } + if = { + limit = { + ai_has_warlike_personality = yes + } + add = { + desc = ai_warlike_personality + value = 0.1 + } + } + if = { + limit = { + ai_has_conqueror_personality = yes + } + add = { + desc = ai_conqueror_personality + value = 0.2 + } + } + if = { + limit = { + ai_has_economical_boom_personality = yes + } + add = { + desc = ai_economical_boom_personality + value = -0.2 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_high_medieval + } + primary_title ?= { + tier >= tier_kingdom + } + monthly_character_income >= 20 + } + add = { + desc = "significant ruler, high medieval" + value = 0.2 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_late_medieval + } + primary_title ?= { + tier >= tier_kingdom + } + monthly_character_income >= 40 + } + add = { + desc = "significant ruler, late medieval" + value = 0.2 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_high_medieval + } + primary_title ?= { + tier < tier_kingdom + } + monthly_character_income >= 30 + } + add = { + desc = "lesser ruler, high medieval" + value = 0.1 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_late_medieval + } + primary_title ?= { + tier < tier_kingdom + } + monthly_character_income >= 60 + } + add = { + desc = "lesser ruler, late medieval" + value = 0.1 + } + } + if = { + limit = { + has_character_flag = vassal_directive_build_maa + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + add = { + desc = ai_directive + value = 0.5 + } + } + + min = 0 + max = 0.9 +} + +### Brief: ai_men_at_arms_expense_gold_max +# The AI will disband MAA if it ends up spending more than this amount of its +# income on maintenance. This is referenced in code, so do not rename or remove +# this without talking with a programmer about it. +# +# Value between 0 and 1, where 1 eqivalents using 100% of its income on maa +# maintenance. +# +# Scopes: +# root - character +# AI character evaluating the ideal percentile. +# +ai_men_at_arms_expense_gold_max = { + value = { + value = 0.6 + desc = "default value" + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_high_medieval + } + primary_title ?= { + tier >= tier_kingdom + } + } + add = { + desc = "significant ruler, high medieval" + value = 0.2 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_late_medieval + } + primary_title ?= { + tier >= tier_kingdom + } + } + add = { + desc = "significant ruler, late medieval" + value = 0.2 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_high_medieval + } + primary_title ?= { + tier < tier_kingdom + } + } + add = { + desc = "lesser ruler, high medieval" + value = 0.05 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_late_medieval + } + primary_title ?= { + tier < tier_kingdom + } + } + add = { + desc = "lesser ruler, late medieval" + value = 0.1 + } + } + if = { + limit = { + has_character_flag = vassal_directive_build_maa + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + add = { + desc = ai_directive + value = 0.1 + } + } + if = { + limit = { + government_allows = administrative + NOT = { vassal_contract_has_flag = admin_theme_civilian } + } + add = { + desc = ai_admin_vassal + value = 0.3 + } + } + + min = 0 + max = 0.9 + + if = { + limit = { + government_allows = administrative + debt_level <= 2 + } + value = 3 + } +} + +### Brief: ai_men_at_arms_expense_prestige_min +# The AI will quickly try to spend this much of its prestige income on MAA +# maintenance. This is referenced in code, so do not rename or remove this +# without talking with a programmer about it. +# +# Value between 0 and 1, where 1 equivalents to using 100% of its income on maa +# maintenance. +# +# Scopes: +# root - character +# AI character evaluating the ideal percentile. +# +ai_men_at_arms_expense_prestige_min = { + value = { + value = 0.25 + desc = "default value" + } + if = { + limit = { + ai_has_warlike_personality = yes + } + add = { + desc = ai_warlike_personality + value = 0.1 + } + } + if = { + limit = { + ai_has_conqueror_personality = yes + } + add = { + desc = ai_conqueror_personality + value = 0.2 + } + } + if = { + limit = { + ai_has_cautious_personality = yes + } + add = { + desc = ai_cautious_personality + value = 0.1 + } + } + if = { + limit = { + ai_has_economical_boom_personality = yes + } + add = { + desc = ai_economical_boom_personality + value = -0.1 + } + } + if = { + limit = { + has_character_flag = vassal_directive_build_maa + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + add = { + desc = ai_directive + value = 0.5 + } + } + + min = 0 + max = 0.9 +} + +### Brief: ai_men_at_arms_expense_prestige_ideal +# The AI will try to spend this much of its income on MAA maintenance. It won't +# buy beyond this, but might end up higher due to reduced income. This is +# referenced in code, so do not rename or remove this without talking with a +# programmer about it. +# +# Value between 0 and 1, where 1 equivalents to using 100% of its income on maa +# maintenance. +# +# Scopes: +# root - character +# AI character evaluating the ideal percentile. +# +ai_men_at_arms_expense_prestige_ideal = { + value = { + value = 0.4 + desc = "default value" + } + if = { + limit = { + ai_has_warlike_personality = yes + } + add = { + desc = ai_warlike_personality + value = 0.1 + } + } + if = { + limit = { + ai_has_conqueror_personality = yes + } + add = { + desc = ai_conqueror_personality + value = 0.2 + } + } + if = { + limit = { + ai_has_economical_boom_personality = yes + } + add = { + desc = ai_economical_boom_personality + value = -0.1 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_high_medieval + } + primary_title ?= { + tier >= tier_kingdom + } + } + add = { + desc = "significant ruler, high medieval" + value = 0.2 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_late_medieval + } + primary_title ?= { + tier >= tier_kingdom + } + } + add = { + desc = "significant ruler, high medieval" + value = 0.2 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_high_medieval + } + primary_title ?= { + tier < tier_kingdom + } + } + add = { + desc = "lesser ruler, high medieval" + value = 0.1 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_late_medieval + } + primary_title ?= { + tier < tier_kingdom + } + } + add = { + desc = "lesser ruler, late medieval" + value = 0.1 + } + } + if = { + limit = { + has_character_flag = vassal_directive_build_maa + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + add = { + desc = ai_directive + value = 0.1 + } + } + + min = 0 + max = 0.9 +} + +### Brief: ai_men_at_arms_expense_prestige_max +# The AI will disband MAA if it ends up spending more than this amount of its +# income on maintenance. This is referenced in code, so do not rename or remove +# this without talking with a programmer about it. +# +# Value between 0 and 1, where 1 equivalents to using 100% of its income on maa +# maintenance. +# +# Scopes: +# root - character +# AI character evaluating the ideal percentile. +# +ai_men_at_arms_expense_prestige_max = { + value = { + value = 0.6 + desc = "default value" + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_high_medieval + } + primary_title ?= { + tier >= tier_kingdom + } + } + add = { + desc = "significant ruler, high medieval" + value = 0.2 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_late_medieval + } + primary_title ?= { + tier >= tier_kingdom + } + } + add = { + desc = "significant ruler, high medieval" + value = 0.2 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_high_medieval + } + primary_title ?= { + tier < tier_kingdom + } + } + add = { + desc = "lesser ruler, high medieval" + value = 0.05 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_late_medieval + } + primary_title ?= { + tier < tier_kingdom + } + } + add = { + desc = "lesser ruler, late medieval" + value = 0.1 + } + } + if = { + limit = { + has_character_flag = vassal_directive_build_maa + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + add = { + desc = ai_directive + value = 0.1 + } + } + + min = 0 + max = 0.9 +} + +### Brief: ai_men_at_arms_chance_expense_below_min +# Chance the AI will prefer MaA to buildings when spending less than the ideal +# on MaA. +# +# Value between 0 and 1, where 1 equivalents to a 100% chance of recruiting MaA +# instead of a building. +# +# Scopes: +# root - character +# AI character evaluating the ideal percentile. +# +ai_men_at_arms_chance_expense_below_min = { + value = { + value = 0.4 + desc = "default value" + } + if = { + limit = { + ai_has_warlike_personality = yes + } + add = { + desc = ai_warlike_personality + value = 0.4 + } + } + if = { + limit = { + ai_has_conqueror_personality = yes + } + add = { + desc = ai_conqueror_personality + value = 0.6 + } + } + if = { + limit = { + ai_has_cautious_personality = yes + } + add = { + desc = ai_cautious_personality + value = 0.2 + } + } + if = { + limit = { + ai_has_economical_boom_personality = yes + } + add = { + desc = ai_economical_boom_personality + value = -0.3 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_high_medieval + } + primary_title ?= { + tier >= tier_kingdom + } + } + add = { + desc = "significant ruler, high medieval" + value = 0.2 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_late_medieval + } + primary_title ?= { + tier >= tier_kingdom + } + } + add = { + desc = "significant ruler, high medieval" + value = 0.4 + } + } + if = { + limit = { + ai_should_focus_on_building_in_their_capital = yes + } + multiply = 0 + add = 0.1 + } + if = { + limit = { + has_character_flag = vassal_directive_build_maa + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + add = { + desc = ai_directive + value = 1 + } + } + + min = 0 + max = 0.9 +} + +### Brief: ai_men_at_arms_chance_expense_below_ideal +# Chance the AI will prefer MaA to buildings when spending less than the ideal +# on MaA. +# +# Value between 0 and 1, where 1 equivalents to a 100% chance of recruiting MaA +# instead of a building. +# +# Scopes: +# root - character +# AI character evaluating the ideal percentile. +# +ai_men_at_arms_chance_expense_below_ideal = { + value = { + value = 0.1 + desc = "default value" + } + if = { + limit = { + ai_has_warlike_personality = yes + } + add = { + desc = ai_warlike_personality + value = 0.4 + } + } + if = { + limit = { + ai_has_conqueror_personality = yes + } + add = { + desc = ai_conqueror_personality + value = 0.6 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_high_medieval + } + primary_title ?= { + tier >= tier_kingdom + } + } + add = { + desc = "significant ruler, high medieval" + value = 0.2 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_late_medieval + } + primary_title ?= { + tier >= tier_kingdom + } + } + add = { + desc = "significant ruler, high medieval" + value = 0.2 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_high_medieval + } + primary_title ?= { + tier < tier_kingdom + } + } + add = { + desc = "lesser ruler, high medieval" + value = 0.05 + } + } + if = { + limit = { + culture ?= { + has_cultural_era_or_later = culture_era_late_medieval + } + primary_title ?= { + tier < tier_kingdom + } + } + add = { + desc = "lesser ruler, high medieval" + value = 0.1 + } + } + if = { + limit = { + ai_has_economical_boom_personality = yes + } + multiply = { + desc = ai_economical_boom_personality + value = 0.1 + } + } + if = { + limit = { + ai_should_focus_on_building_in_their_capital = yes + } + multiply = 0 + add = 0.1 + } + if = { + limit = { + has_character_flag = vassal_directive_build_maa + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + add = { + desc = ai_directive + value = 1 + } + } + + min = 0 + max = 0.9 +} + +### Brief: ai_men_at_arms_chance_landless_ruler +# Chance the AI will prefer MaA to buildings when they are a landless ruler. +# Is used exclusively when the character fulfils the requirement: +# - they are a ruler (they hold a title, which also means adventurers) +# - they are not landed +# +# Value between 0 and 1, where 1 equivalents to a 100% chance of recruiting MaA +# instead of a building. +# +# Scopes: +# root - character +# AI character evaluating the ideal percentile. +# +ai_men_at_arms_chance_landless_ruler = { + value = { + value = 0.5 + desc = "default value" + if = { + limit = { + OR = { + has_realm_law = camp_purpose_mercenaries + has_realm_law = camp_purpose_brigands + } + } + add = 0.25 + } + if = { + limit = { + has_realm_law = camp_purpose_scholars + } + add = -0.25 + } + if = { # Landless admin focus mostly on Buildings + limit = { + government_allows = administrative + } + add = -0.3 + } + if = { # Adventurers want a minimum set of buildings + limit = { + is_landless_adventurer = yes + max_military_strength >= 100 + domicile.num_domicile_buildings <= 4 + } + add = -0.4 + } + if = { # To avoid Adventurer travels becoming super-costly provision-wise, they should focus on buildings over MaA at certain ratios + limit = { + is_landless_adventurer = yes + max_military_strength >= 500 + domicile.max_provisions <= 4000 + } + multiply = 0 + } + } +} diff --git a/common/script_values/00_basic_values.txt b/common/script_values/00_basic_values.txt new file mode 100644 index 00000000..7e26dd16 --- /dev/null +++ b/common/script_values/00_basic_values.txt @@ -0,0 +1,1943 @@ +test_value = 5 +test_bool = yes + +#Gold stuff +tiny_gold_value_check = 10 +#tiny_gold_value = 10 +minor_gold_value_check = 30 +#minor_gold_value = 30 +medium_gold_value_check = 100 +#medium_gold_value = 100 +major_gold_value_check = 300 +#major_gold_value = 300 + + +#Dynamic gold stuff +tiny_gold_min_value = 5 +tiny_gold_max_value_static = 50 +tiny_gold_max_value = { + value = tiny_gold_max_value_static + if = { + limit = { + exists = culture + } + culture = { + if = { + limit = { + has_cultural_era_or_later = culture_era_late_medieval + } + multiply = 3 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_high_medieval + } + multiply = 1.5 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_early_medieval + } + multiply = 1 + } + else = { + multiply = 0.75 + } + } + } +} +minor_gold_min_value = 15 +minor_gold_max_value_static = 150 +minor_gold_max_value = { + value = minor_gold_max_value_static + if = { + limit = { + exists = culture + } + culture = { + if = { + limit = { + has_cultural_era_or_later = culture_era_late_medieval + } + multiply = 3 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_high_medieval + } + multiply = 1.5 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_early_medieval + } + multiply = 1 + } + else = { + multiply = 0.75 + } + } + } +} +medium_gold_min_value = 50 +medium_gold_max_value_static = 300 +medium_gold_max_value = { + value = medium_gold_max_value_static + if = { + limit = { + exists = culture + } + culture = { + if = { + limit = { + has_cultural_era_or_later = culture_era_late_medieval + } + multiply = 3 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_high_medieval + } + multiply = 1.5 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_early_medieval + } + multiply = 1 + } + else = { + multiply = 0.75 + } + } + } +} +major_gold_min_value = 75 +major_gold_max_value_static = 500 +major_gold_max_value = { + value = major_gold_max_value_static + if = { + limit = { + exists = culture + } + culture = { + if = { + limit = { + has_cultural_era_or_later = culture_era_late_medieval + } + multiply = 3 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_high_medieval + } + multiply = 1.5 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_early_medieval + } + multiply = 1 + } + else = { + multiply = 0.75 + } + } + } +} +massive_gold_min_value = 100 +massive_gold_max_value_static = 750 +massive_gold_max_value = { + value = massive_gold_max_value_static + if = { + limit = { + exists = culture + } + culture = { + if = { + limit = { + has_cultural_era_or_later = culture_era_late_medieval + } + multiply = 3 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_high_medieval + } + multiply = 1.5 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_early_medieval + } + multiply = 1 + } + else = { + multiply = 0.75 + } + } + } +} +monumental_gold_min_value = 200 +monumental_gold_max_value_static = 1500 +monumental_gold_max_value = { + value = monumental_gold_max_value_static + if = { + limit = { + exists = culture + } + culture = { + if = { + limit = { + has_cultural_era_or_later = culture_era_late_medieval + } + multiply = 3 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_high_medieval + } + multiply = 1.5 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_early_medieval + } + multiply = 1 + } + else = { + multiply = 0.75 + } + } + } +} + +tiny_income_multiplier_value = 1.2 +minor_income_multiplier_value = 3 +medium_income_multiplier_value = 6 +major_income_multiplier_value = 12 +massive_income_multiplier_value = 18 +monumental_income_multiplier_value = 36 + +current_gold_value = { + value = gold + floor = yes +} + +# TIMERS +default_event_cooldown_duration = 730 +long_event_cooldown_duration = 1200 +default_favor_duration = 3650 + +#SKILL RATINGS +average_skill_rating = 8 #Tracks what we see as "typical". For use in duels, etc. + +low_skill_rating = 5 +mediocre_skill_rating = 8 +medium_skill_rating = 10 +decent_skill_rating = 12 +high_skill_rating = 15 +very_high_skill_rating = 18 +extremely_high_skill_rating = 20 +monumentally_high_skill_rating = 25 +inverted_low_skill_rating = { + value = 0 + subtract = low_skill_rating +} +inverted_mediocre_skill_rating = { + value = 0 + subtract = mediocre_skill_rating +} +inverted_medium_skill_rating = { + value = 0 + subtract = medium_skill_rating +} +inverted_decent_skill_rating = { + value = 0 + subtract = decent_skill_rating +} +inverted_high_skill_rating = { + value = 0 + subtract = high_skill_rating +} +inverted_very_high_skill_rating = { + value = 0 + subtract = very_high_skill_rating +} +inverted_extremely_high_skill_rating = { + value = 0 + subtract = extremely_high_skill_rating +} + + +# SKILL BONUS/PENALTIES +minor_skill_bonus = 1 +minor_skill_penalty = -1 +medium_skill_bonus = 2 +medium_skill_penalty = -2 +major_skill_bonus = 3 +major_skill_penalty = -3 +massive_skill_bonus = 4 +massive_skill_penalty = -4 + + +#TEMPLATE SKILLS +skill_variance = 2 + +guest_template_average_skill = 10 + +min_guest_template_skill = { + add = guest_template_average_skill + subtract = skill_variance +} +max_guest_template_skill = { + add = guest_template_average_skill + add = skill_variance +} + +min_template_low_skill = { + add = low_skill_rating + subtract = skill_variance +} +max_template_low_skill = { + add = low_skill_rating + add = skill_variance +} + +min_template_average_skill = { + add = average_skill_rating + subtract = skill_variance +} +max_template_average_skill = { + add = average_skill_rating + add = skill_variance +} + +min_template_medium_skill = { + add = medium_skill_rating + subtract = skill_variance +} +max_template_medium_skill = { + add = medium_skill_rating + add = skill_variance +} + +min_template_decent_skill = { + add = decent_skill_rating + subtract = skill_variance +} +max_template_decent_skill = { + add = decent_skill_rating + add = skill_variance +} + +min_template_high_skill = { + add = high_skill_rating + subtract = skill_variance +} +max_template_high_skill = { + add = high_skill_rating + add = skill_variance +} + +min_template_very_high_skill = { + add = very_high_skill_rating + subtract = skill_variance +} +max_template_very_high_skill = { + add = very_high_skill_rating + add = skill_variance +} + +# SKILL LEVELS +#Relates to the skill levels in the defines: DO NOT UPDATE THESE WITHOUT CHANGING THOSE, and vice versa. +#Each level is everything below it that isn't part of another level, apart from excellency, which is everything at that number and above. +terrible_skill_level = 3 +poor_skill_level = 7 +average_skill_level = 11 +good_skill_level = 15 +excellent_skill_level = 16 + + +sum_of_all_skills_value = { + add = intrigue + add = diplomacy + add = stewardship + add = martial + add = learning +} + +sum_of_all_skills_and_prowess_value = { + value = sum_of_all_skills_value + add = prowess +} + +average_of_all_skills = { + value = sum_of_all_skills_value + divide = 5 +} + +average_of_all_skills_and_prowess = { + value = sum_of_all_skills_value + divide = 6 +} + +sum_of_all_skills_threshold_terrible = { + value = low_skill_rating + multiply = 5 +} +sum_of_all_skills_threshold_poor = { + value = medium_skill_rating + multiply = 5 +} +sum_of_all_skills_threshold_average = { + value = decent_skill_rating + multiply = 5 +} +sum_of_all_skills_threshold_good = { + value = high_skill_rating + multiply = 5 +} +sum_of_all_skills_threshold_excellent = { + value = very_high_skill_rating + multiply = 5 +} + +highest_skill_value = { + value = 0 + if = { + limit = { highest_skill = diplomacy } + add = diplomacy + } + else_if = { + limit = { highest_skill = martial } + add = martial + } + else_if = { + limit = { highest_skill = stewardship } + add = stewardship + } + else_if = { + limit = { highest_skill = intrigue } + add = intrigue + } + else = { add = learning } +} + +#Piety ratings +low_negative_piety_level = -1 +low_piety_level = 1 +medium_piety_level = 2 +high_piety_level = 3 +very_high_piety_level = 4 +max_piety_level = 5 + +#Prestige levels +low_prestige_level = 1 +medium_prestige_level = 2 +high_prestige_level = 3 +very_high_prestige_level = 4 +max_prestige_level = 5 + +# HEALTH +miniscule_health_penalty = -0.25 +minor_health_penalty = -0.5 +medium_health_penalty = -1 +major_health_penalty = -1.5 +massive_health_penalty = -2 +monumental_health_penalty = -3 + +miniscule_health_bonus = 0.25 +minor_health_bonus = 0.5 +medium_health_bonus = 1 +major_health_bonus = 1.5 +massive_health_bonus = 2 +monumental_health_bonus = 3 + +#Pregnancy, Wounds, & Disease +pregnancy_chance = 30 #Chance of becoming pregnant from the had_sex_with_effect +seduce_pregnancy_chance = 50 +wound_treatment_success_duration = 1095 +wound_treatment_success_duration_plus_1 = 1096 +wound_treatment_failure_duration = 365 +wound_treatment_failure_duration_plus_1 = 366 +disease_treatment_short_duration = 365 +disease_treatment_short_duration_plus_1 = 366 +disease_treatment_long_duration = 1825 +disease_treatment_long_duration_plus_1 = 1826 + + +# FERTILITY +minor_fertility_penalty = -0.05 +minor_fertility_bonus = 0.05 + +#Fertility rating +low_fertility = 0.3 +medium_fertility = 0.5 +high_fertility = 0.8 + +#Dread +miniscule_dread_loss = -5 +minor_dread_loss = -10 +medium_dread_loss = -20 +major_dread_loss = -30 +massive_dread_loss = -50 +miniscule_dread_gain = 5 +minor_dread_gain = 10 +medium_dread_gain = 20 +major_dread_gain = 30 +massive_dread_gain = 50 +monumental_dread_gain = 70 + +execute_interaction_minor_dread_gain = 5 +execute_interaction_medium_dread_gain = 10 +execute_interaction_major_dread_gain = 15 +execute_interaction_massive_dread_gain = 30 + +torture_interaction_minor_dread_gain = 5 +torture_interaction_medium_dread_gain = 10 +torture_interaction_major_dread_gain = 15 +torture_interaction_massive_dread_gain = 20 + +intimidated_reason_value = { + value = 50 + if = { + limit = { + scope:actor = { + exists = scope:actor.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +cowed_reason_value = { + value = 100 + if = { + limit = { + scope:actor = { + exists = scope:actor.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +intimidated_external_reason_value = { + value = 10 + if = { + limit = { + scope:actor = { + exists = scope:actor.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +cowed_external_reason_value = { + value = 20 + if = { + limit = { + scope:actor = { + exists = scope:actor.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +intimidated_halved_reason_value = { + value = 25 + if = { + limit = { + scope:actor = { + exists = scope:actor.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +cowed_halved_reason_value = { + value = 50 + if = { + limit = { + scope:actor = { + exists = scope:actor.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +intimidated_scheme_reason_value = { + value = 15 + if = { + limit = { + scope:owner = { + exists = scope:owner.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +cowed_scheme_reason_value = { + value = 30 + if = { + limit = { + scope:owner = { + exists = scope:owner.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +intimidated_scheme_external_reason_value = { + value = 10 + if = { + limit = { + scope:owner = { + exists = scope:owner.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +cowed_scheme_external_reason_value = { + value = 20 + if = { + limit = { + scope:owner = { + exists = scope:owner.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +intimidated_marriage_reason_value = { + value = 75 + if = { + limit = { + scope:actor = { + exists = scope:actor.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +cowed_marriage_reason_value = { + value = 150 + if = { + limit = { + scope:actor = { + exists = scope:actor.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +intimidated_marriage_not_secondary_reason_value = { + value = 25 + if = { + limit = { + scope:actor = { + exists = scope:actor.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +cowed_marriage_not_secondary_reason_value = { + value = 50 + if = { + limit = { + scope:actor = { + exists = scope:actor.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +intimidated_marriage_external_reason_value = { + value = 10 + if = { + limit = { + scope:actor = { + exists = scope:actor.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +cowed_marriage_external_reason_value = { + value = 20 + if = { + limit = { + scope:actor = { + exists = scope:actor.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } +} + +#DREAD VALUE +low_dread = 20 +medium_dread = 40 +high_dread = 80 + +#PRESTIGE + +#Note! These are base values, use loss/gain below +miniscule_prestige_value = 35 +minor_prestige_value = 75 +medium_prestige_value = 150 +major_prestige_value = 350 +massive_prestige_value = 750 +monumental_prestige_value = 1500 + + +miniscule_prestige_loss = { + value = 0 + subtract = miniscule_prestige_value +} +minor_prestige_loss = { + value = 0 + subtract = minor_prestige_value +} +medium_prestige_loss = { + value = 0 + subtract = medium_prestige_value +} +major_prestige_loss = { + value = 0 + subtract = major_prestige_value +} +massive_prestige_loss = { + value = 0 + subtract = massive_prestige_value +} +monumental_prestige_loss = { + value = 0 + subtract = monumental_prestige_value +} + +miniscule_prestige_gain = miniscule_prestige_value +minor_prestige_gain = minor_prestige_value +medium_prestige_gain = medium_prestige_value +major_prestige_gain = major_prestige_value +massive_prestige_gain = massive_prestige_value +monumental_prestige_gain = monumental_prestige_value + +knight_prestige_gain_on_wound = { + value = minor_prestige_gain + if = { + limit = { + exists = scope:enemy_knight.primary_title + scope:enemy_knight.primary_title.tier > 0 + } + multiply = scope:enemy_knight.primary_title.tier + } + if = { + limit = { + exists = scope:enemy_knight + scope:enemy_knight = { + is_lowborn = yes + } + } + divide = 2 + } +} + +knight_prestige_gain_on_kill = { + value = medium_prestige_gain + if = { + limit = { + exists = scope:enemy_knight.primary_title + scope:enemy_knight.primary_title.tier > 0 + } + multiply = scope:enemy_knight.primary_title.tier + } + if = { + limit = { + exists = scope:enemy_knight + scope:enemy_knight = { + is_lowborn = yes + } + } + divide = 2 + } +} + +knight_prestige_gain_on_wound_inverse = { + value = minor_prestige_gain + if = { + limit = { + exists = root.primary_title + root.primary_title.tier > 0 + } + multiply = root.primary_title.tier + } + if = { + limit = { + root = { + is_lowborn = yes + } + } + divide = 2 + } +} + +knight_prestige_gain_on_kill_inverse = { + value = medium_prestige_gain + if = { + limit = { + exists = root.primary_title + root.primary_title.tier > 0 + } + multiply = root.primary_title.tier + } + if = { + limit = { + root = { + is_lowborn = yes + } + } + divide = 2 + } +} + +#PIETY +miniscule_piety_value = 25 +minor_piety_value = 50 +medium_piety_value = 100 +major_piety_value = 250 +massive_piety_value = 500 + + +miniscule_piety_loss = { + value = 0 + subtract = miniscule_piety_value +} +minor_piety_loss = { + value = 0 + subtract = minor_piety_value +} +medium_piety_loss = { + value = 0 + subtract = medium_piety_value +} +major_piety_loss = { + value = 0 + subtract = major_piety_value +} +massive_piety_loss = { + value = 0 + subtract = massive_piety_value +} + +miniscule_piety_gain = miniscule_piety_value +minor_piety_gain = minor_piety_value +medium_piety_gain = medium_piety_value +major_piety_gain = major_piety_value +massive_piety_gain = massive_piety_value + +omega_piety_gain = { + value = massive_piety_value + multiply = 4 +} + +#FAME + +#Note! These are base values, use loss/gain below +miniscule_fame_value = 20 +minor_fame_value = 50 +medium_fame_value = 100 +major_fame_value = 200 +massive_fame_value = 350 +monumental_fame_value = 500 + + +miniscule_fame_loss = { + value = 0 + subtract = miniscule_fame_value +} +minor_fame_loss = { + value = 0 + subtract = minor_fame_value +} +medium_fame_loss = { + value = 0 + subtract = medium_fame_value +} +major_fame_loss = { + value = 0 + subtract = major_fame_value +} +massive_fame_loss = { + value = 0 + subtract = massive_fame_value +} + +miniscule_fame_gain = miniscule_fame_value +minor_fame_gain = minor_fame_value +medium_fame_gain = medium_fame_value +major_fame_gain = major_fame_value +massive_fame_gain = massive_fame_value +monumental_fame_gain = monumental_fame_value + +#DEVOTION + +#Note! These are base values, use loss/gain below +miniscule_devotion_value = 10 +minor_devotion_value = 25 +medium_devotion_value = 50 +major_devotion_value = 100 +massive_devotion_value = 250 + + +miniscule_devotion_loss = { + value = 0 + subtract = miniscule_devotion_value +} +minor_devotion_loss = { + value = 0 + subtract = minor_devotion_value +} +medium_devotion_loss = { + value = 0 + subtract = medium_devotion_value +} +major_devotion_loss = { + value = 0 + subtract = major_devotion_value +} +massive_devotion_loss = { + value = 0 + subtract = massive_devotion_value +} + +miniscule_devotion_gain = miniscule_devotion_value +minor_devotion_gain = minor_devotion_value +medium_devotion_gain = medium_devotion_value +major_devotion_gain = major_devotion_value +massive_devotion_gain = massive_devotion_value + +#FERVOR +miniscule_fervor_value = 10 +minor_fervor_value = 15 +medium_fervor_value = 25 +major_fervor_value = 50 +massive_fervor_value = 100 + + +miniscule_fervor_loss = { + value = 0 + subtract = miniscule_fervor_value +} +minor_fervor_loss = { + value = 0 + subtract = minor_fervor_value +} +medium_fervor_loss = { + value = 0 + subtract = medium_fervor_value +} +major_fervor_loss = { + value = 0 + subtract = major_fervor_value +} +massive_fervor_loss = { + value = 0 + subtract = massive_fervor_value +} + +miniscule_fervor_gain = miniscule_fervor_value +minor_fervor_gain = minor_fervor_value +medium_fervor_gain = medium_fervor_value +major_fervor_gain = major_fervor_value +massive_fervor_gain = massive_fervor_value + +#OPINION +very_high_positive_opinion = 80 # This is someone that trusts you quite a bit, and will be on your side regardless of if it's a major breach of their character - unless it's something that directly opposes them, of course. +high_positive_opinion = 60 #A loyal subject, stalwart ally or respectful ruler. You shouldn't have much to fear from someone with this level of opinion, but they still won't support you should it be a major breach of character for them to do so. +medium_positive_opinion = 40 #At this level a character would be more likely to support you than to keep the status quo, but they could still decide to undermine you should it be in line with their character. +low_positive_opinion = 20 #Someone who has a degree of respect for you. While they are more likely to support you than undermine you, they'd rather prefer to keep the status quo than support you. +neutral_opinion = 0 #Indifferent to you. Will want to keep the status quo, or actively undermine you. +low_negative_opinion = -20 #Someone who doesn't care for you. They'd be amenable to join others in undermining you, but are not interested in starting anything themselves - unless it's something that would mean a great gain for them. +medium_negative_opinion = -40 #Light contempt. These characters would actively work against you given the chance, though they would still need a reason for doing so. They might also not want to, for example, ruin the realm during an active war should they be your vassal. +high_negative_opinion = -60 #Contempt. These characters will often work to undermine you, unless there are extreme circumstances (such as them being your parent). +very_high_negative_opinion = -80 #This is someone who hates you. They will want to do anything in their power to undermine you, and frequently so. (edited) + + + +#WAR VALUES +break_truce_prestige_loss = -250 +break_truce_prestige_level_loss = -1 +attack_ally_prestige_loss = -250 +attack_ally_prestige_level_loss = -1 + +#TYRANNY VALUES +minor_tyranny_value = 5 +medium_tyranny_value = 10 +major_tyranny_value = 20 +massive_tyranny_value = 30 + +minor_tyranny_gain = minor_tyranny_value +medium_tyranny_gain = medium_tyranny_value +major_tyranny_gain = major_tyranny_value +massive_tyranny_gain = massive_tyranny_value + +minor_tyranny_loss = { + value = 0 + subtract = minor_tyranny_value +} +medium_tyranny_loss = { + value = 0 + subtract = medium_tyranny_value +} +major_tyranny_loss = { + value = 0 + subtract = major_tyranny_value +} +massive_tyranny_loss = { + value = 0 + subtract = massive_tyranny_value +} + +low_tyranny = 10 +medium_tyranny = 40 +high_tyranny = 80 + +imprisonment_tyranny_gain = { + value = 20 + if = { + limit = { + exists = scope:imprisonment_target + scope:imprisonment_target = { + has_no_real_status_trigger = yes + } + } + add = -15 + } +} +execution_tyranny_gain = { + value = 10 + if = { + limit = { + exists = scope:victim + scope:victim = { + has_no_real_status_trigger = yes + } + } + add = -5 + } +} +banishment_tyranny_gain = 5 +revoke_title_tyranny_gain = 20 +revoke_vassal_tyranny_gain = 5 + +#TRAIT VALUES +commander_trait_limit = 3 +childhood_personality_trait_gain_limit = 3 #Trigger in a compare modifier in child_personaluity.9999 +childhood_fourth_personality_trait_chance = 5 #Percentage in a random chance in child_personaluity.9999 + +personality_trait_minimum = 2 +personality_trait_standard = 3 +personality_trait_limit = 4 + + +#LIFESTYLE VALUES +lifestyle_rank_up_1_threshold = 30 +lifestyle_rank_up_2_threshold = 50 +lifestyle_rank_up_3_threshold = 70 +minimum_event_rank_up_threshold = 3 +decline_rank_up_cost = -5 +reimburse_declined_rank_up_cost = 2 #1 lower to prevent a new event from firing immediately +standard_lifestyle_focus_progress = 1 +ongoing_lifestyle_event_delay = 1 +#Reveler rank up thresholds +reveler_rank_up_1_threshold = 3 +reveler_rank_up_2_threshold = 5 +reveler_rank_up_3_threshold = 7 +#Hunter rank up thresholds +hunter_rank_up_1_threshold = 3 +hunter_rank_up_2_threshold = 5 +hunter_rank_up_3_threshold = 7 +#Seduce progress chances and values +monthly_seduce_lifestyle_progress_chance = 20 +seduce_lifestyle_seduction_success_base_progress = 8 +seduce_lifestyle_3_tiers_above_progress_multiplier = 2.5 +seduce_lifestyle_2_tiers_above_progress_multiplier = 1.8 +seduce_lifestyle_1_tier_above_progress_multiplier = 1.25 +seduce_lifestyle_1_tier_below_progress_multiplier = 0.6 +seduce_lifestyle_2_tiers_below_progress_multiplier = 0.4 +seduce_lifestyle_3_tiers_below_progress_multiplier = 0.15 + +#BUILDINGS +minor_building_cost = 400 +medium_building_cost = 500 +major_building_cost = 600 + +#ATTRACTION +low_positive_attraction = 10 +medium_positive_attraction = 20 +high_positive_attraction = 30 +low_negative_attraction = -10 +medium_negative_attraction = -20 +high_negative_attraction = -30 + + +#DEVELOPMENT LEVEL VALUES +terrible_development_level = 10 +bad_development_level = 20 +medium_development_level = 40 +good_development_level = 60 +great_development_level = 80 +max_development_level = 100 + +#DEVELOPMENT CHANGE VALUES +minor_development_level_loss = -10 +medium_development_level_loss = -20 +major_development_level_loss = -30 +minor_development_level_gain = 10 +medium_development_level_gain = 20 +major_development_level_gain = 30 + +#DEVELOPMENT PROGRESS VALUES +minimal_development_progress_loss = -10 +minor_development_progress_loss = -20 +medium_development_progress_loss = -40 +major_development_progress_loss = -80 +massive_development_progress_loss = -100 +minimal_development_progress_gain = 10 +minor_development_progress_gain = 20 +medium_development_progress_gain = 40 +major_development_progress_gain = 80 +massive_development_progress_ = 100 + +#DEVELOPMENT GROWTH VALUES +tiny_development_growth_gain = 0.05 +small_development_growth_gain = 0.1 +medium_development_growth_gain = 0.2 +large_development_growth_gain = 0.3 +very_large_development_growth_gain = 0.5 + +tiny_development_growth_loss = -0.1 +small_development_growth_loss = -0.2 +medium_development_growth_loss = -0.3 +large_development_growth_loss = -0.5 +very_large_development_growth_loss = -0.8 + +#HEALTH +excellent_health = 7 +good_health = 5 +medium_health = 4 +fine_health = 3 #The names of these should be updated to match the defines (HEALTH_STATE_LEVELS_VALUES, HEALTH_STATE_LEVELS_TEXTS) +poor_health = 1 +dying_health = 0 + +death_chance_starts_health = 3 +death_chance_dying_health = 1.5 + +#Incest Opinion Values +close_relative_known_incest_opinion_loss_value = -25 +same_dynasty_known_incest_opinion_loss_value = -15 +known_incest_opinion_loss_value = -10 + + +#SIEGE VALUES +siege_capture_chance = 50 + +#Relation values +friend_opinion_impact = 50 +rival_opinion_impact = -50 +mentor_opinion_impact = 15 +student_opinion_impact = 30 +lover_opinion_impact = 40 +guardian_opinion_impact = 15 +ward_opinion_impact = 5 +bully_opinion_impact = -30 +victim_opinion_impact = -40 +crush_opinion_impact = 30 + +#DYNASTY PRESTIGE + +#Note! These are base values, use loss/gain below +miniscule_dynasty_prestige_value = { + value = 25 + multiply = { value = scale_dynasty_prestige_by_era } +} +minor_dynasty_prestige_value = { + value = 50 + multiply = { value = scale_dynasty_prestige_by_era } +} +medium_dynasty_prestige_value = { + value = 75 + multiply = { value = scale_dynasty_prestige_by_era } +} +major_dynasty_prestige_value = { + value = 150 + multiply = { value = scale_dynasty_prestige_by_era} +} +massive_dynasty_prestige_value = { + value = 250 + multiply = { value = scale_dynasty_prestige_by_era } +} +monumental_dynasty_prestige_value = 1000 +excessive_dynasty_prestige_value = 2500 + +scale_dynasty_prestige_by_era = { + value = 1 + if = { + limit = { + exists = dynast.culture + } + dynast.culture = { + if = { + limit = { has_cultural_era_or_later = culture_era_late_medieval } + add = 3 + } + else_if = { + limit = { has_cultural_era_or_later = culture_era_high_medieval } + add = 2 + } + else_if = { + limit = { has_cultural_era_or_later = culture_era_early_medieval } + add = 1 + } + } + } +} + +miniscule_dynasty_prestige_loss = { + value = 0 + subtract = miniscule_dynasty_prestige_value +} +minor_dynasty_prestige_loss = { + value = 0 + subtract = minor_dynasty_prestige_value +} +medium_dynasty_prestige_loss = { + value = 0 + subtract = medium_dynasty_prestige_value +} +major_dynasty_prestige_loss = { + value = 0 + subtract = major_dynasty_prestige_value +} +massive_dynasty_prestige_loss = { + value = 0 + subtract = massive_prestige_value +} +monumental_dynasty_prestige_loss = { + value = 0 + subtract = monumental_dynasty_prestige_value +} +excessive_dynasty_prestige_loss = { + value = 0 + subtract = excessive_dynasty_prestige_value +} + +miniscule_dynasty_prestige_gain = { value = miniscule_dynasty_prestige_value } +minor_dynasty_prestige_gain = { value = minor_dynasty_prestige_value } +medium_dynasty_prestige_gain = { value = medium_dynasty_prestige_value } +major_dynasty_prestige_gain = { value = major_dynasty_prestige_value } +massive_dynasty_prestige_gain = { value = massive_dynasty_prestige_value } +monumental_dynasty_prestige_gain = { value = monumental_dynasty_prestige_value } +excessive_dynasty_prestige_gain = { value = excessive_dynasty_prestige_value } + +max_dynasty_prestige_level = 10 +high_dynasty_prestige_level = 7 +medium_dynasty_prestige_level = 4 +low_dynasty_prestige_level = 2 +min_dynasty_prestige_level = 0 + +#RANGES + +#For use in "squared_distance" triggers +diplomatic_range = 1000000 + +#DE JURE DRIFT +medium_de_jure_drift_progress_gain = 15 +medium_de_jure_drift_progress_loss = -15 + +#Send Gift +send_gift_opinion = { + value = 5 + add = { + if = { + limit = { + scope:actor.diplomacy > 0 + } + add = { + value = scope:actor.diplomacy + multiply = 3 + } + } + if = { + limit = { + scope:recipient.ai_greed > 0 + } + add = { + value = scope:recipient.ai_greed + divide = 3 + } + } + if = { + limit = { + scope:recipient.liege = scope:actor + } + divide = 1.5 + } + if = { + limit = { + scope:recipient = scope:actor.faith.religious_head + } + divide = 3 + } + if = { + limit = { + scope:actor.culture ?= { + has_innovation = fp3_innovation_fritware + } + } + multiply = 1.2 + } + max = 100 + } + if = { + limit = { + scope:actor.culture = { has_cultural_parameter = more_gift_opinion } + } + multiply = 1.2 + } + if = { + limit = { + scope:actor = { has_perk = thoughtful_perk } + } + multiply = 2 + } +} + +gift_artifact_opinion = { + value = 0 + scope:target = { + # Per level of Rarity + if = { + limit = { rarity = common } + add = 10 + } + else_if = { + limit = { rarity = masterwork } + add = 25 + } + else_if = { + limit = { rarity = famed } + add = 50 + } + else = { add = 100 } + if = { # AI Greed + limit = { scope:recipient.ai_greed > 0 } + multiply = { # Up to *2 + value = 1 + add = { + value = scope:recipient.ai_greed + divide = 100 + } + } + } + if = { + limit = { artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY } + divide = 3 # 1/3 for damaged artifacts + } + if = { + limit = { artifact_durability <= define:NInventory|ARTIFACT_VERY_LOW_DURABILITY } + divide = 3 # 1/3 for very damaged artifacts + } + if = { + limit = { can_be_claimed_by = scope:recipient } + multiply = 1.5 # 3/2 for claimed artifacts + } + if = { + limit = { scope:recipient.liege = scope:actor } + divide = 1.33 # 3/4 for vassals + } + floor = yes + if = { + limit = { scope:recipient = scope:actor.faith.religious_head } + divide = 2 # 1/2 for religious heads + } + if = { + limit = { + OR = { + AND = { + has_variable = banner_house + NOT = { var:banner_house = scope:recipient.house } + } + AND = { + has_variable = banner_dynasty + NOT = { var:banner_dynasty = scope:recipient.dynasty } + } + } + } + subtract = 100 # 1/10 for useless banners + min = 0 + } + else_if = { + limit = { + scope:recipient = { + NOR = { + can_equip_artifact = scope:target + can_benefit_from_artifact = scope:target + } + } + } + divide = 10 # 1/10 for useless artifacts + } + else_if = { + limit = { + scope:recipient = { + OR = { + NOT = { can_equip_artifact = scope:target } + NOT = { can_benefit_from_artifact = scope:target } + } + } + } + divide = 5 # 1/5 for unfit artifacts + } + else = { min = 5 } + } + max = 150 +} + + +#POOL VALUES + +full_pool_size = 30 + +# CULTURE VALUES +convert_to_local_culture_base_cost = 1000 + + +# Sexuality + +default_heterosexuality_chance = { + value = 100 + subtract = define:NCharacter|PERCENTAGE_HOMOSEXUAL + subtract = define:NCharacter|PERCENTAGE_BISEXUAL + subtract = define:NCharacter|PERCENTAGE_ASEXUAL +} + +heterosexuality_chance = { + if = { + limit = { has_game_rule = sexuality_distribution_default } + value = default_heterosexuality_chance + } + else_if = { + limit = { has_game_rule = sexuality_distribution_equal } + value = 25 + } + else_if = { + limit = { has_game_rule = sexuality_distribution_most_common_homosexuality } + value = define:NCharacter|PERCENTAGE_HOMOSEXUAL #Swapping with homosexual + } + else_if = { + limit = { has_game_rule = sexuality_distribution_most_common_bisexuality } + value = define:NCharacter|PERCENTAGE_BISEXUAL #Swapping with bisexual + } + else_if = { + limit = { has_game_rule = sexuality_distribution_most_common_asexuality } + value = define:NCharacter|PERCENTAGE_ASEXUAL #Swapping with asexuality + } +} + +homosexuality_chance = { + if = { + limit = { has_game_rule = sexuality_distribution_default } + value = define:NCharacter|PERCENTAGE_HOMOSEXUAL + } + else_if = { + limit = { has_game_rule = sexuality_distribution_equal } + value = 25 + } + else_if = { + limit = { has_game_rule = sexuality_distribution_most_common_homosexuality } + value = default_heterosexuality_chance #Swapped with heterosexuality + } + else_if = { + limit = { has_game_rule = sexuality_distribution_most_common_bisexuality } + value = define:NCharacter|PERCENTAGE_HOMOSEXUAL + } + else_if = { + limit = { has_game_rule = sexuality_distribution_most_common_asexuality } + value = define:NCharacter|PERCENTAGE_HOMOSEXUAL + } +} + +bisexuality_chance = { + if = { + limit = { has_game_rule = sexuality_distribution_default } + value = define:NCharacter|PERCENTAGE_BISEXUAL + } + else_if = { + limit = { has_game_rule = sexuality_distribution_equal } + value = 25 + } + else_if = { + limit = { has_game_rule = sexuality_distribution_most_common_homosexuality } + value = define:NCharacter|PERCENTAGE_BISEXUAL + } + else_if = { + limit = { has_game_rule = sexuality_distribution_most_common_bisexuality } + value = default_heterosexuality_chance #Swapped with heterosexuality + } + else_if = { + limit = { has_game_rule = sexuality_distribution_most_common_asexuality } + value = define:NCharacter|PERCENTAGE_BISEXUAL + } +} + +asexuality_chance = { + if = { + limit = { has_game_rule = sexuality_distribution_default } + value = define:NCharacter|PERCENTAGE_ASEXUAL + } + else_if = { + limit = { has_game_rule = sexuality_distribution_equal } + value = 25 + } + else_if = { + limit = { has_game_rule = sexuality_distribution_most_common_homosexuality } + value = define:NCharacter|PERCENTAGE_ASEXUAL + } + else_if = { + limit = { has_game_rule = sexuality_distribution_most_common_bisexuality } + value = define:NCharacter|PERCENTAGE_ASEXUAL + } + else_if = { + limit = { has_game_rule = sexuality_distribution_most_common_asexuality } + value = default_heterosexuality_chance #Swapped with heterosexuality + } +} + +# Requires changed_obligations list to be set for contract obligations +# This = Person who's obligation we are checking +count_obligation_improvements_for_vassal = { + value = 0 + + save_temporary_scope_as = vassal + + every_in_list = { + list = changed_obligations + + vassal_contract_type = { + save_temporary_scope_as = contract_type + } + + add = { + value = obligation_level_score + subtract = "scope:vassal.vassal_contract_obligation_level_score( scope:contract_type )" + } + } +} + +# Requires local_var: to be set for feudal obligations +# Requires scope:recipient to be set +# This = Person who's obligation we are checking +count_obligation_improvements_for_vassal_include_hook = { + value = count_obligation_improvements_for_vassal + if = { + limit = { always = scope:hook } + subtract = 1 + } + if = { + limit = { always = scope:diarch } + subtract = 1 + } +} + +vassal_obligation_increase_tyranny_gain_base = 20 + +# Requires scope:recipient to bet set +# Requires local_var: to be set for feudal obligations +vassal_obligation_increase_tyranny_gain_multiplier = { + subtract = scope:recipient.count_obligation_improvements_for_vassal # Good for vassal is bad for liege + if = { + limit = { + always = scope:hook + } + subtract = 1 + } + min = 0 +} + +# Requires scope:recipient to bet set +# Requires local_var: to be set for feudal obligations +# Use in the scope of the person getting tyranny +vassal_obligation_increase_tyranny_gain = { + value = vassal_obligation_increase_tyranny_gain_base + multiply = vassal_obligation_increase_tyranny_gain_multiplier +} + +#REALM SIZE +##About a moderate duchy. +tiny_realm_size = 6 +##About x1 (de jure) Wales. +minor_realm_size = 12 +##About x1 (de jure) Scotland. +medium_realm_size = 24 +##About x1 (1066) England. +major_realm_size = 40 +##About x1 (1066) France. +massive_realm_size = 84 +##About x1 (1066) ERE. +monumental_realm_size = 160 +##About x1 (1066) HRE. +enormous_realm_size = 250 + +# Percentages of realm size for comparison. +75_percent_realm_size_value = { + value = sub_realm_size + multiply = 0.75 + floor = yes +} +50_percent_realm_size_value = { + value = sub_realm_size + multiply = 0.5 + floor = yes +} +33_percent_realm_size_value = { + value = sub_realm_size + multiply = 0.33 + floor = yes +} +25_percent_realm_size_value = { + value = sub_realm_size + multiply = 0.25 + floor = yes +} + +#FOR DIVORCE +divorce_cost = 100 + +#PERKS +sound_foundations_max = 5 +embassies_max = 5 +friendly_counsel_max = 5 +decentralized_rule_max = 5 +confidants_max = 5 + +#AMENITIES +low_amenity_level = 1 +medium_amenity_level = 2 +high_amenity_level = 3 +very_high_amenity_level = 4 +max_amenity_level = 5 + +#COURT GRANDEUR LEVEL VALUES +low_court_grandeur_level = 2 +medium_court_grandeur_level = 4 +high_court_grandeur_level = 6 +very_high_court_grandeur_level = 8 +max_court_grandeur_level = 10 + +#CURRENT COURT GRANDEUR VALUES +miniscule_court_grandeur_value = 3 +minor_court_grandeur_value = 6 +medium_court_grandeur_value = 10 +major_court_grandeur_value = 14 +massive_court_grandeur_value = 18 +monumental_court_grandeur_value = 25 + +## Positives. +miniscule_court_grandeur_gain = miniscule_court_grandeur_value +minor_court_grandeur_gain = minor_court_grandeur_value +medium_court_grandeur_gain = medium_court_grandeur_value +major_court_grandeur_gain = major_court_grandeur_value +massive_court_grandeur_gain = massive_court_grandeur_value +monumental_court_grandeur_gain = monumental_court_grandeur_value + +## Negatives. +miniscule_court_grandeur_loss = { + value = 0 + subtract = miniscule_court_grandeur_value +} +minor_court_grandeur_loss = { + value = 0 + subtract = minor_court_grandeur_value +} +medium_court_grandeur_loss = { + value = 0 + subtract = medium_court_grandeur_value +} +major_court_grandeur_loss = { + value = 0 + subtract = major_court_grandeur_value +} +massive_court_grandeur_loss = { + value = 0 + subtract = massive_court_grandeur_value +} +monumental_court_grandeur_loss = { + value = 0 + subtract = monumental_court_grandeur_value +} + +# SCALES OF POWER + +miniscule_sop_swing_value = 3 +minor_sop_swing_value = 5 +medium_sop_swing_value = 10 +major_sop_swing_value = 20 +massive_sop_swing_value = 30 +monumental_sop_swing_value = 40 + +miniscule_sop_swing_diarch_gain = miniscule_sop_swing_value +minor_sop_swing_diarch_gain = minor_sop_swing_value +medium_sop_swing_diarch_gain = medium_sop_swing_value +major_sop_swing_diarch_gain = major_sop_swing_value +massive_sop_swing_diarch_gain = massive_sop_swing_value +monumental_sop_swing_diarch_gain = monumental_sop_swing_value + +miniscule_sop_swing_liege_gain = { + value = miniscule_sop_swing_value + multiply = -1 +} +minor_sop_swing_liege_gain = { + value = minor_sop_swing_value + multiply = -1 +} +medium_sop_swing_liege_gain = { + value = medium_sop_swing_value + multiply = -1 +} +major_sop_swing_liege_gain = { + value = major_sop_swing_value + multiply = -1 +} +massive_sop_swing_liege_gain = { + value = massive_sop_swing_value + multiply = -1 +} +monumental_sop_swing_liege_gain = { + value = monumental_sop_swing_value + multiply = -1 +} + +# STRIFE VALUES +minor_strife_value = 10 +medium_strife_value = 15 +major_strife_value = 25 +massive_strife_value = 35 +monumental_strife_value = 50 + +minor_strife_gain = minor_strife_value +medium_strife_gain = medium_strife_value +major_strife_gain = major_strife_value +massive_strife_gain = massive_strife_value +monumental_strife_gain = monumental_strife_value + +minor_strife_loss = { + value = minor_strife_value + multiply = -1 +} +medium_strife_loss = { + value = medium_strife_value + multiply = -1 +} +major_strife_loss = { + value = major_strife_value + multiply = -1 +} +massive_strife_loss = { + value = massive_strife_value + multiply = -1 +} +monumental_strife_loss = { + value = monumental_strife_value + multiply = -1 +} + +strife_harm_threshold_value = { + value = 20 + # Lower this for just or underhanded characters. + ## Just + if = { + limit = { has_trait = just } + add = -10 + } + ## Deceitful + if = { + limit = { has_trait = deceitful } + add = -5 + } + ## Vengeful + if = { + limit = { has_trait = vengeful } + add = -5 + } + # Increase it for arbitrary or honest ones. + ## Arbitrary + if = { + limit = { has_trait = arbitrary } + add = 20 + } + ## Honest + if = { + limit = { has_trait = honest } + add = 10 + } + ## Forgiving + if = { + limit = { has_trait = forgiving } + add = 10 + } +} + +# GLORY VALUES + +sub_minimal_glory_value = 5 +minimal_glory_value = 10 +minor_glory_value = 25 +medium_glory_value = 50 +major_glory_value = 100 +massive_glory_value = 150 +monumental_glory_value = 250 + +sub_minimal_glory_gain = sub_minimal_glory_value +minimal_glory_gain = minimal_glory_value +minor_glory_gain = minor_glory_value +medium_glory_gain = medium_glory_value +major_glory_gain = major_glory_value +massive_glory_gain = massive_glory_value +monumental_glory_gain = monumental_glory_value + +minimal_glory_loss = { + value = minimal_glory_value + multiply = -1 +} +minor_glory_loss = { + value = minor_glory_value + multiply = -1 +} +medium_glory_loss = { + value = medium_glory_value + multiply = -1 +} +major_glory_loss = { + value = major_glory_value + multiply = -1 +} +massive_glory_loss = { + value = massive_glory_value + multiply = -1 +} +monumental_glory_loss = { + value = monumental_glory_value + multiply = -1 +} +starting_provisions_value = 1500 + +microscopic_provisions_value = 20 +miniscule_provisions_value = 75 +minor_provisions_value = 200 +medium_provisions_value = 400 +major_provisions_value = 600 +massive_provisions_value = 1200 +monumental_provisions_value = 2000 + +microscopic_provisions_gain = microscopic_provisions_value +miniscule_provisions_gain = miniscule_provisions_value +minor_provisions_gain = minor_provisions_value +medium_provisions_gain = medium_provisions_value +major_provisions_gain = major_provisions_value +massive_provisions_gain = massive_provisions_value +monumental_provisions_gain = monumental_provisions_value + +microscopic_provisions_loss = { + value = microscopic_provisions_value + multiply = -1 +} +miniscule_provisions_loss = { + value = miniscule_provisions_value + multiply = -1 +} +minor_provisions_loss = { + value = minor_provisions_value + multiply = -1 +} +medium_provisions_loss = { + value = medium_provisions_value + multiply = -1 +} +major_provisions_loss = { + value = major_provisions_value + multiply = -1 +} +massive_provisions_loss = { + value = massive_provisions_value + multiply = -1 +} +monumental_provisions_loss = { + value = monumental_provisions_value + multiply = -1 +} diff --git a/common/script_values/00_character_values.txt b/common/script_values/00_character_values.txt new file mode 100644 index 00000000..7e061df4 --- /dev/null +++ b/common/script_values/00_character_values.txt @@ -0,0 +1,159 @@ +# For use with our new hybrid-skill duel system +diplomacy_martial = { + value = 0 + add = diplomacy + add = martial + divide = 2 +} + +diplomacy_stewardship = { + value = 0 + add = diplomacy + add = stewardship + divide = 2 +} + +diplomacy_intrigue = { + value = 0 + add = diplomacy + add = intrigue + divide = 2 +} + +diplomacy_learning = { + value = 0 + add = diplomacy + add = learning + divide = 2 +} + +diplomacy_prowess = { + value = 0 + add = diplomacy + add = prowess + divide = 2 +} + +martial_stewardship = { + value = 0 + add = martial + add = stewardship + divide = 2 +} + +martial_intrigue = { + value = 0 + add = martial + add = intrigue + divide = 2 +} + +martial_learning = { + value = 0 + add = martial + add = learning + divide = 2 +} + +martial_prowess = { + value = 0 + add = martial + add = prowess + divide = 2 +} + +stewardship_intrigue = { + value = 0 + add = stewardship + add = intrigue + divide = 2 +} + +stewardship_learning = { + value = 0 + add = stewardship + add = learning + divide = 2 +} + +stewardship_prowess = { + value = 0 + add = stewardship + add = prowess + divide = 2 +} + +intrigue_learning = { + value = 0 + add = intrigue + add = learning + divide = 2 +} + +intrigue_prowess = { + value = 0 + add = intrigue + add = prowess + divide = 2 +} + +learning_prowess = { + value = 0 + add = learning + add = prowess + divide = 2 +} + +random_nickname_chance = { + value = primary_title.tier + add = { + value = age + divide = 10 + } + add = prestige_level + add = piety_level + if = { + limit = { + prestige_level >= 3 + has_trait = conqueror + } + add = 10 + } + if = { + limit = { + prestige_level >= 4 + has_trait = conqueror + } + add = 10 + } + if = { + limit = { + primary_title.tier >= tier_duchy + } + add = primary_title.tier + } + if = { + limit = { + is_ai = no + } + add = 1 + } + if = { + limit = { + has_game_rule = random_nickname_frequency_halved + } + multiply = 0.5 + } + else_if = { + limit = { + has_game_rule = random_nickname_frequency_quartered + } + multiply = 0.25 + } + else_if = { + limit = { + has_game_rule = random_nickname_frequency_doubled + } + multiply = 2 + } +} \ No newline at end of file diff --git a/common/script_values/00_council_values.txt b/common/script_values/00_council_values.txt new file mode 100644 index 00000000..6a58a027 --- /dev/null +++ b/common/script_values/00_council_values.txt @@ -0,0 +1,73 @@ + + + +marshal_task_side_effect_cooldown = 365 #Number of days minimum before the Marshal can fire a side effect event from a task again +marshal_task_modifier_duration = 1825 #Number of days that modifiers set by the marshal task should last for by default + +chancellor_task_side_effect_cooldown = 365 +chancellor_task_modifier_duration = 1825 + +steward_task_side_effect_cooldown = 365 +steward_task_modifier_duration = 1825 + +spymaster_task_side_effect_cooldown = 365 +spymaster_task_modifier_duration = 1825 + +court_chaplain_task_side_effect_cooldown = 365 +court_chaplain_task_modifier_duration = 1825 + +council_scaled_monthly_income = { + add = liege.highest_held_title_tier + subtract = 2 + min = 0.5 +} + +council_scaled_by_liege_tier = { + add = liege.highest_held_title_tier + subtract = 1 + min = 1 +} + +council_scaled_skill_value = { + add = liege.highest_held_title_tier + subtract = 1 +} + +council_friend_impact_percentage = 20 + +council_best_friend_impact_percentage = 30 + +council_rival_impact_percentage = -20 + +council_nemesis_impact_percentage = -30 + +council_reliable_house_percentage = 10 + +council_task_fabricate_claim_relative_strength = { + value = max_military_strength + multiply = 1.2 +} + +council_scaled_by_liege_tier_not_admin = { + value = council_scaled_by_liege_tier + if = { + limit = { government_allows = administrative } + multiply = 0 + } +} + +council_scaled_admin_value = { + value = 0 # This value should be 0 for anyone who isn't admin + if = { + limit = { + government_allows = administrative + } + add = 1 + if = { + limit = { + liege = { highest_held_title_tier >= tier_empire } + } + multiply = 2 + } + } +} diff --git a/common/script_values/00_county_control_values.txt b/common/script_values/00_county_control_values.txt new file mode 100644 index 00000000..dfdf33d0 --- /dev/null +++ b/common/script_values/00_county_control_values.txt @@ -0,0 +1,129 @@ +###################### +# County Corruption values +###################### + +miniscule_county_control_loss = -5 +minor_county_control_loss = -10 +medium_county_control_loss = -20 +major_county_control_loss = -30 +extreme_county_control_loss = -40 +massive_county_control_loss = -50 +monumental_county_control_loss = -75 +miniscule_county_control_gain = 5 +minor_county_control_gain = 10 +medium_county_control_gain = 20 +major_county_control_gain = 30 +extreme_county_control_gain = 40 +massive_county_control_gain = 50 +monumental_county_control_gain = 75 + +low_county_control = 33 +medium_county_control = 66 +full_county_control = 100 + +low_county_control_limit = 35 +high_county_control_limit = 95 + +high_control_county_corruption_removal_chance = 35 + +max_county_corruption_modifiers_at_once = 3 + +script_county_control = { + value = 0 + add = county_control +} + +county_corruption_modifier_count = { + if = { + limit = { + has_county_modifier = county_corruption_inefficient_tax_collection_modifier + } + add = 1 + } + if = { + limit = { + has_county_modifier = county_corruption_deserting_levies_modifier + } + add = 1 + } + if = { + limit = { + has_county_modifier = county_corruption_smuggling_ring_modifier + } + add = 1 + } + if = { + limit = { + has_county_modifier = county_corruption_inefficient_census_modifier + } + add = 1 + } + if = { + limit = { + has_county_modifier = county_corruption_lack_of_sheriffs_modifier + } + add = 1 + } + if = { + limit = { + has_county_modifier = county_corruption_lack_of_courts_modifier + } + add = 1 + } + if = { + limit = { + has_county_modifier = county_corruption_thieves_guild_modifier + } + add = 1 + } + if = { + limit = { + has_county_modifier = county_corruption_unsafe_highways_modifier + } + add = 1 + } + if = { + limit = { + has_county_modifier = county_corruption_uncooperative_guilds_modifier + } + add = 1 + } + if = { + limit = { + has_county_modifier = county_corruption_lackluster_administration_modifier + } + add = 1 + } +} + +county_control_corruption_gain_chance = { + add = low_county_control_limit + #Account for actual county control + subtract = county_control # At low_county_control_limit Control, there is a 0 percent chance of gaining Corruption + + divide = { + add = 5 # A base of approximately 25% chance of gaining corruption per year at 0 Control + } + divide = { # Further reduce the chance of corruption per corruption modifier the County already has + add = county_corruption_modifier_count + multiply = 2 + min = 1 + } +} + +in_debt_county_corruption_gain_chance = { + value = 3 + + add = { #Gold should always be a negative value at this point + value = 0 + subtract = holder.gold + multiply = 0.005 #Make it 1% more likely per -200 gold + max = 5 + } + + #Make it linearly less likely to accrue additional modifiers for each modifiers you have + divide = { + add = 1 + add = county_corruption_modifier_count + } +} \ No newline at end of file diff --git a/common/script_values/00_court_amenities_values.txt b/common/script_values/00_court_amenities_values.txt new file mode 100644 index 00000000..6b9d7c5e --- /dev/null +++ b/common/script_values/00_court_amenities_values.txt @@ -0,0 +1,386 @@ +############################ +# AMENITIES COST VALUES +############################ +# BASE VALUES + +base_court_amenities_cost = { + value = sub_realm_size + divide = { + add = 4 + subtract = { + add = 0.25 + multiply = court_grandeur_current_level + } + } + if = { # Add a baseline depending on rank + limit = { + highest_held_title_tier = tier_empire + } + add = 20 + } + else = { + add = 10 + } + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + multiply = { + value = 1.75 + } + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + multiply = { + value = 1.5 + } + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + multiply = { + value = 1.25 + } + } +} + +court_amenities_cost_level_1 = { + value = base_court_amenities_cost + divide = 96 + min = 0.2 + if = { + limit = { + government_has_flag = government_is_tribal + } + min = 0.4 + } +} +court_amenities_cost_level_1_fashion = { + value = court_amenities_cost_level_1 + if = { + limit = { + has_character_flag = court_free_fashion + } + min = 0 + multiply = 0 + } +} +court_amenities_cost_level_1_food = { + value = court_amenities_cost_level_1 + if = { + limit = { + has_character_modifier = rivers_of_wine_modifier + } + multiply = 0.5 + } + if = { + limit = { + OR = { + has_character_modifier = employer_booner_food_taster_2_modifier + has_character_modifier = employer_booner_food_taster_3_modifier + } + } + multiply = 0.75 + } +} +court_amenities_cost_level_1_lodgings = { + value = court_amenities_cost_level_1 + if = { + limit = { + OR = { + has_character_modifier = employer_booner_seneschal_2_modifier + has_character_modifier = employer_booner_seneschal_3_modifier + } + } + multiply = 0.75 + } +} +court_amenities_cost_level_1_servants = { + value = court_amenities_cost_level_1 + if = { + limit = { + OR = { + has_character_modifier = employer_booner_cupbearer_2_modifier + has_character_modifier = employer_booner_cupbearer_3_modifier + } + } + multiply = 0.75 + } +} +court_amenities_cost_level_2 = { + value = base_court_amenities_cost + divide = 48 + min = 0.4 + if = { + limit = { + government_has_flag = government_is_tribal + } + min = 0.8 + } +} +court_amenities_cost_level_2_fashion = { + value = court_amenities_cost_level_2 + if = { + limit = { + has_character_flag = court_cheaper_fashion + } + multiply = 0.8 + } +} +court_amenities_cost_level_2_food = { + value = court_amenities_cost_level_2 + if = { + limit = { + has_character_flag = court_cheaper_food + } + multiply = 0.8 + } + if = { + limit = { + has_character_modifier = rivers_of_wine_modifier + } + multiply = 0.5 + } + if = { + limit = { + OR = { + has_character_modifier = employer_booner_food_taster_2_modifier + has_character_modifier = employer_booner_food_taster_3_modifier + } + } + multiply = 0.75 + } +} +court_amenities_cost_level_2_lodgings = { + value = court_amenities_cost_level_2 + if = { + limit = { + has_character_modifier = lodgings_epidemics_resistance_modifier_1 + } + multiply = 0.85 + } + if = { + limit = { + has_character_modifier = lodgings_epidemics_resistance_modifier_2 + } + multiply = 0.75 + } + if = { + limit = { + OR = { + has_character_modifier = employer_booner_seneschal_2_modifier + has_character_modifier = employer_booner_seneschal_3_modifier + } + } + multiply = 0.75 + } +} +court_amenities_cost_level_2_servants = { + value = court_amenities_cost_level_2 + if = { + limit = { + has_character_flag = court_cheaper_servants + } + multiply = 0.8 + } + if = { + limit = { + OR = { + has_character_modifier = employer_booner_cupbearer_2_modifier + has_character_modifier = employer_booner_cupbearer_3_modifier + } + } + multiply = 0.75 + } +} +court_amenities_cost_level_3 = { + value = base_court_amenities_cost + divide = 32 + min = 0.6 + if = { + limit = { + government_has_flag = government_is_tribal + } + min = 1.2 + } +} +court_amenities_cost_level_3_food = { + value = court_amenities_cost_level_3 + if = { + limit = { + has_character_modifier = rivers_of_wine_modifier + } + multiply = 0.5 + } + if = { + limit = { + OR = { + has_character_modifier = employer_booner_food_taster_2_modifier + has_character_modifier = employer_booner_food_taster_3_modifier + } + } + multiply = 0.75 + } +} +court_amenities_cost_level_3_lodgings = { + value = court_amenities_cost_level_3 + if = { + limit = { + OR = { + has_character_modifier = employer_booner_seneschal_2_modifier + has_character_modifier = employer_booner_seneschal_3_modifier + } + } + multiply = 0.75 + } +} +court_amenities_cost_level_3_servants = { + value = court_amenities_cost_level_3 + if = { + limit = { + OR = { + has_character_modifier = employer_booner_cupbearer_2_modifier + has_character_modifier = employer_booner_cupbearer_3_modifier + } + } + multiply = 0.75 + } +} +court_amenities_cost_level_4 = { + value = base_court_amenities_cost + divide = 24 + min = 0.8 + if = { + limit = { + government_has_flag = government_is_tribal + } + min = 1.6 + } +} +court_amenities_cost_level_4_food = { + value = court_amenities_cost_level_4 + if = { + limit = { + has_character_modifier = rivers_of_wine_modifier + } + multiply = 0.5 + } + if = { + limit = { + OR = { + has_character_modifier = employer_booner_food_taster_2_modifier + has_character_modifier = employer_booner_food_taster_3_modifier + } + } + multiply = 0.75 + } +} +court_amenities_cost_level_4_lodgings = { + value = court_amenities_cost_level_4 + if = { + limit = { + OR = { + has_character_modifier = employer_booner_seneschal_2_modifier + has_character_modifier = employer_booner_seneschal_3_modifier + } + } + multiply = 0.75 + } +} +court_amenities_cost_level_4_servants = { + value = court_amenities_cost_level_4 + if = { + limit = { + OR = { + has_character_modifier = employer_booner_cupbearer_2_modifier + has_character_modifier = employer_booner_cupbearer_3_modifier + } + } + multiply = 0.75 + } +} + +############################ +# FASHION COSTS +############################ + +court_fashion_acceptable_cost = { + value = court_amenities_cost_level_1_fashion +} +court_fashion_decent_cost = { + value = court_amenities_cost_level_2_fashion +} +court_fashion_good_cost = { + value = court_amenities_cost_level_3 +} +court_fashion_fantastic_cost = { + value = court_amenities_cost_level_4 +} + +############################ +# FOOD QUALITY COSTS +############################ + +court_food_quality_modest_cost = { + value = court_amenities_cost_level_1_food +} +court_food_quality_decent_cost = { + value = court_amenities_cost_level_2_food +} +court_food_quality_lavish_cost = { + value = court_amenities_cost_level_3_food +} +court_food_quality_exotic_cost = { + value = court_amenities_cost_level_4_food +} + +############################ +# LODGING STANDARTS COSTS +############################ + +court_lodging_standards_small_cost = { + value = court_amenities_cost_level_1_lodgings +} +court_lodging_standards_middling_cost = { + value = court_amenities_cost_level_2_lodgings +} +court_lodging_standards_spacious_cost = { + value = court_amenities_cost_level_3_lodgings +} +court_lodging_standards_grand_cost = { + value = court_amenities_cost_level_4_lodgings +} + + +############################ +# COURT SERVANTS COSTS +############################ + +court_servants_few_cost = { + value = court_amenities_cost_level_1_servants +} +court_court_servants_some_cost = { + value = court_amenities_cost_level_2_servants +} +court_court_servants_many_cost = { + value = court_amenities_cost_level_3_servants +} +court_servants_endless_cost = { + value = court_amenities_cost_level_4_servants +} + +# Referenced from code +# root is the character +# Determines how long amenity cooldowns are in months +court_amenity_cooldown_months = { + value = 12 +} diff --git a/common/script_values/00_court_position_values.txt b/common/script_values/00_court_position_values.txt new file mode 100644 index 00000000..b4f40a79 --- /dev/null +++ b/common/script_values/00_court_position_values.txt @@ -0,0 +1,754 @@ + +############################ +# MINOR TITLE COSTS +############################ + +minor_court_position_salary = { + add = { + value = 0.25 + desc = COURT_POSITION_SALARY_BREAKDOWN_BASE + format = "BASE_VALUE_FORMAT_DECIMALS" + } + if = { + limit = { + scope:liege.sub_realm_size >= 120 + } + multiply = { + value = 1.6 + desc = enormous_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.sub_realm_size >= 90 + } + multiply = { + value = 1.4 + desc = large_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.sub_realm_size >= 60 + } + multiply = { + value = 1.2 + desc = medium_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.sub_realm_size >= 30 + } + multiply = { + value = 1.1 + desc = small_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + } + multiply = { + value = 1.75 + desc = culture_era_late_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + } + multiply = { + value = 1.5 + desc = culture_era_high_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + } + multiply = { + value = 1.25 + desc = culture_era_early_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + highest_held_title_tier >= tier_empire + } + } + multiply = { + value = 1.25 + desc = empire_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + government_has_flag = government_is_tribal + } + } + multiply = { + value = 0.25 + desc = tribal_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE" + } + } + if = { + limit = { + scope:liege = { + culture = { + has_cultural_parameter = cheaper_court_positions + } + } + } + multiply = { + value = 0.8 + desc = esteemed_hospitality_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE" + } + } +} +medium_court_position_salary = { + add = { + value = 0.5 + desc = COURT_POSITION_SALARY_BREAKDOWN_BASE + format = "BASE_VALUE_FORMAT_DECIMALS" + } + if = { + limit = { + scope:liege.sub_realm_size >= 120 + } + multiply = { + value = 1.6 + desc = enormous_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.sub_realm_size >= 90 + } + multiply = { + value = 1.4 + desc = large_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.sub_realm_size >= 60 + } + multiply = { + value = 1.2 + desc = medium_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.sub_realm_size >= 30 + } + multiply = { + value = 1.1 + desc = small_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + } + multiply = { + value = 1.75 + desc = culture_era_late_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + } + multiply = { + value = 1.5 + desc = culture_era_high_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + } + multiply = { + value = 1.25 + desc = culture_era_early_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + highest_held_title_tier >= tier_empire + } + } + multiply = { + value = 1.25 + desc = empire_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + government_has_flag = government_is_tribal + } + } + multiply = { + value = 0.25 + desc = tribal_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE" + } + } + if = { + limit = { + scope:liege = { + culture = { + has_cultural_parameter = cheaper_court_positions + } + } + } + multiply = { + value = 0.8 + desc = esteemed_hospitality_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE" + } + } +} +major_court_position_salary = { + add = { + value = 1.0 + desc = COURT_POSITION_SALARY_BREAKDOWN_BASE + format = "BASE_VALUE_FORMAT_DECIMALS" + } + if = { + limit = { + scope:liege.sub_realm_size >= 120 + } + multiply = { + value = 1.6 + desc = enormous_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.sub_realm_size >= 90 + } + multiply = { + value = 1.4 + desc = large_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.sub_realm_size >= 60 + } + multiply = { + value = 1.2 + desc = medium_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.sub_realm_size >= 30 + } + multiply = { + value = 1.1 + desc = small_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + } + multiply = { + value = 1.75 + desc = culture_era_late_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + } + multiply = { + value = 1.5 + desc = culture_era_high_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + } + multiply = { + value = 1.25 + desc = culture_era_early_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + highest_held_title_tier >= tier_empire + } + } + multiply = { + value = 1.25 + desc = empire_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + government_has_flag = government_is_tribal + } + } + multiply = { + value = 0.25 + desc = tribal_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE" + } + } + if = { + limit = { + scope:liege = { + culture = { + has_cultural_parameter = cheaper_court_positions + } + } + } + multiply = { + value = 0.8 + desc = esteemed_hospitality_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE" + } + } +} + +court_position_physician_salary = { + add = { + value = 0.1 + desc = COURT_POSITION_SALARY_BREAKDOWN_BASE + format = "BASE_VALUE_FORMAT_DECIMALS" + } + if = { + limit = { exists = scope:liege } + if = { + limit = { + scope:liege.culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + multiply = { + value = 1.75 + desc = culture_era_late_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + multiply = { + value = 1.5 + desc = culture_era_high_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + multiply = { + value = 1.25 + desc = culture_era_early_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + highest_held_title_tier >= tier_empire + } + } + multiply = { + value = 1.25 + desc = empire_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + government_has_flag = government_is_tribal + } + } + multiply = { + value = 0.25 + desc = tribal_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE" + } + } + if = { + limit = { + scope:liege.culture = { + has_cultural_parameter = cheaper_court_positions + } + } + multiply = { + value = 0.8 + desc = esteemed_hospitality_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE" + } + } + } +} + +court_position_antiquarian_salary = { + add = { + value = 0.15 + desc = COURT_POSITION_SALARY_BREAKDOWN_BASE + format = "BASE_VALUE_FORMAT_DECIMALS" + } + if = { + limit = { + scope:liege.sub_realm_size >= 120 + } + multiply = { + value = 1.6 + desc = enormous_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.sub_realm_size >= 90 + } + multiply = { + value = 1.4 + desc = large_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.sub_realm_size >= 60 + } + multiply = { + value = 1.2 + desc = medium_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege.sub_realm_size >= 30 + } + multiply = { + value = 1.1 + desc = small_realm_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + } + multiply = { + value = 1.75 + desc = culture_era_late_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + } + multiply = { + value = 1.5 + desc = culture_era_high_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + else_if = { + limit = { + scope:liege = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + } + multiply = { + value = 1.25 + desc = culture_era_early_medieval_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + highest_held_title_tier >= tier_empire + } + } + multiply = { + value = 1.25 + desc = empire_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_PLUS_NEGATIVE" + } + } + if = { + limit = { + scope:liege = { + government_has_flag = government_is_tribal + } + } + multiply = { + value = 0.25 + desc = tribal_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE" + } + } + if = { + limit = { + scope:liege = { + culture = { + has_cultural_parameter = cheaper_court_positions + } + } + } + multiply = { + value = 0.8 + desc = esteemed_hospitality_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE" + } + } +} + +court_position_travel_leader_salary = { + add = { + value = 0.1 + desc = COURT_POSITION_SALARY_BREAKDOWN_BASE + format = "BASE_VALUE_FORMAT_DECIMALS" + } + + if = { + limit = { + scope:liege = { + culture = { + has_cultural_parameter = cheaper_court_positions + } + } + } + multiply = { + value = 0.8 + desc = esteemed_hospitality_salary_mod + format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE" + } + } +} + +minor_court_position_task_prestige_salary = 0.2 + +minor_court_position_prestige_salary = 0.5 +medium_court_position_prestige_salary = 1.0 +major_court_position_prestige_salary = 2.0 + +minor_court_position_piety_salary = 0.5 +medium_court_position_piety_salary = 1.0 +major_court_position_piety_salary = 2.0 + +minor_court_position_prestige_cost = -0.2 + +minor_court_position_prestige_revoke_cost = { + value = 25 + if = { + limit = { + exists = this + has_character_flag = temporary_court_position_cost_removal + } + multiply = 0 + } +} +medium_court_position_prestige_revoke_cost = { + value = 75 + if = { + limit = { + exists = this + has_character_flag = temporary_court_position_cost_removal + } + multiply = 0 + } +} +major_court_position_prestige_revoke_cost = { + value = 200 + if = { + limit = { + exists = this + has_character_flag = temporary_court_position_cost_removal + } + multiply = 0 + } +} + + +# INFLUENCE - EP3 +minor_court_position_influence_salary = 0.5 +medium_court_position_influence_salary = 1.0 +major_court_position_influence_salary = 2.0 + +minor_court_position_influence_cost = -0.2 + +minor_court_position_influence_revoke_cost = 25 +medium_court_position_influence_revoke_cost = 75 +major_court_position_influence_revoke_cost = 200 + + +############################ +# COURT POSITION EFFECTIVENESS LEVELS +############################ + +terrible_effectiveness = 1 +poor_effectiveness = 2 +average_effectiveness = 3 +good_effectiveness = 4 +excellent_effectiveness = 5 + +garuda_prowess_svalue = 8 + + +executioner_control_value = { + scope:actor = { + every_court_position_holder = { + type = executioner_court_position + add = this.aptitude:executioner_court_position + } + } + multiply = 3 +} +executioner_control_value_tooltip = { # Keep identical to executioner_control_value + every_court_position_holder = { + type = executioner_court_position + add = this.aptitude:executioner_court_position + } + multiply = 3 +} + +############################ +# COURT POSITION OPINIONS +############################ + +regular_court_position_opinion = 5 +ceremonial_court_position_opinion = 10 +regular_camp_officer_opinion = 2 +high_camp_officer_opinion = 5 + +court_jester_position_opinion = { + scope:employee = { + if = { + limit = { + has_no_particular_noble_roots_trigger = yes + } + value = 5 + } + else = { + value = -20 + } + } +} + + + +adjust_court_position_score_for_unity = { + if = { + limit = { + scope:liege = { government_has_flag = government_is_clan } + scope:employee = { + house ?= scope:liege.house + ai_wants_high_unity = yes + } + } + add = 25 + } + else_if = { + limit = { + scope:liege = { government_has_flag = government_is_clan } + scope:employee = { + NOT ={ house ?= scope:liege.house } + ai_wants_low_unity = yes + } + } + add = 25 + } +} diff --git a/common/script_values/00_culture_values.txt b/common/script_values/00_culture_values.txt new file mode 100644 index 00000000..2eaf251d --- /dev/null +++ b/common/script_values/00_culture_values.txt @@ -0,0 +1,878 @@ + +# Don't remove the below hex code thingy: not sure what black magic it's doing, but it prevents a startup error somehow. +grant_title_cultural_acceptance_impact = { + value = 0 + #How many counties am I giving away out of the total counties of this culture? + add = { + every_in_list = { + list = target_titles + limit = { + tier = tier_county + NOT = { culture = scope:actor.culture } + culture = scope:recipient.culture + NOT = { + recent_history = { + type = granted + years = 10 + } + } + } + add = 1 + } + divide = { + value = culture_number_of_counties + min = 1 + } + multiply = 15 #If you are giving all counties with this culture self rule then you will increase acceptance by 15% - If this is changed also change revoke_title_culture_acceptance_impact + + min = 0.5 + max = 15 + } + add = { # Up to an additional 10 acceptance for Duchies or Kingdoms with a capital of this culture + every_in_list = { #2 per duchy + list = target_titles + if = { + limit = { + tier = tier_duchy + title_capital_county = { + NOT = { culture = scope:actor.culture } + culture = scope:recipient.culture + } + NOT = { + recent_history = { + type = granted + years = 10 + } + } + } + add = 2 + } + } + every_in_list = { #3 per Kingdom + list = target_titles + if = { + limit = { + tier = tier_kingdom + title_capital_county = { + NOT = { culture = scope:actor.culture } + culture = scope:recipient.culture + } + NOT = { + recent_history = { + type = granted + years = 10 + } + } + } + add = 3 + } + } + max = 10 + } +} + +revoke_title_culture_acceptance_impact = { + value = 0 + if = { + limit = { + scope:landed_title = { + tier = tier_county + NOT = { culture = scope:actor.culture } + culture = scope:recipient.culture + NOT = { + recent_history = { + type = revoked + years = 5 + } + } + } + } + subtract = { + value = 1 + divide = { + value = scope:landed_title.culture.culture_number_of_counties + min = 1 + } + multiply = 15 #Same as used in grant above + + min = 0.5 + max = 15 + } + } + else = { + scope:landed_title = { + subtract = tier + add = 1 # because tier starts at the barony level and we want to start counting at the county level + } + } +} + +auto_grant_county_cultural_acceptance_impact = { + value = 0 + + add = { + value = 1 + divide = { + value = scope:landed_title.culture.culture_number_of_counties + min = 1 + } + multiply = 15 #Same as used in grant above + + min = 0.5 + max = 15 + } +} + +culture_conversion_acceptance_impact = { #The smaller a culture is, the more upset it will be. + subtract = { + value = 1 + divide = { + value = scope:county.culture.culture_number_of_counties + min = 1 + } + multiply = 15 #Same as used in grant above + + min = 0.5 + max = 15 + } +} + +declare_war_culture_acceptance_impact = { + value = 0 + scope:defender.primary_title = { + subtract = tier + add = 1 + } +} + +declare_war_culture_acceptance_impact = { + value = 0 + scope:defender.primary_title = { + subtract = tier + add = 1 + } +} + +hybridization_threshold_flat_number_value = 40 + +hybridization_threshold_value = { + value = hybridization_threshold_flat_number_value + # Cultural Parameters + if = { + limit = { + root.culture = { + has_cultural_parameter = easier_to_hybridize + } + } + multiply = 0.5 + } + if = { + limit = { + root.culture = { + has_cultural_parameter = harder_to_hybridize + } + } + multiply = 2 + } + if = { + limit = { + exists = scope:culture + scope:culture = { + has_cultural_parameter = harder_to_hybridize + } + } + multiply = 2 + } + # Struggles + if = { + limit = { + exists = scope:culture + root = { + OR = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = easier_culture_hybridising_for_involved_and_interlopers + is_culture_involved_in_struggle = scope:culture + } + any_character_struggle = { + involvement = interloper + has_struggle_phase_parameter = easier_culture_hybridising_for_involved_and_interlopers + is_culture_involved_in_struggle = scope:culture + } + } + } + } + multiply = 0.5 + } + # Events + if = { + limit = { + root = { + exists = var:special_culture + var:special_culture = scope:culture + } + } + multiply = 0.75 + } + max = 100 + min = 0 +} + +hybridization_ai_threshold_value = { + value = hybridization_threshold_flat_number_value + add = 10 +} + +culture_divergence_cooldown = { + value = 100 + # Game Rules + if = { + limit = { + has_game_rule = slower_hybrid_and_divergence_cooldowns + } + add = 100 + } + else_if = { + limit = { + has_game_rule = faster_hybrid_and_divergence_cooldowns + } + add = -50 + } + else_if = { + limit = { + has_game_rule = no_hybrid_and_divergence_cooldowns + } + multiply = 0 + } +} + +culture_hybrid_cooldown = { + value = 50 + # Game Rules + if = { + limit = { + has_game_rule = slower_hybrid_and_divergence_cooldowns + } + add = 50 + } + else_if = { + limit = { + has_game_rule = faster_hybrid_and_divergence_cooldowns + } + add = -25 + } + else_if = { + limit = { + has_game_rule = no_hybrid_and_divergence_cooldowns + } + multiply = 0 + } +} +add_tradition_cooldown = 50 + +tradition_base_cost = 2000 +tradition_double_base_cost = { + value = tradition_base_cost + multiply = 2 +} +tradition_incompatible_ethos_penalty = 2000 +tradition_unfulfilled_criteria_penalty = 3000 +tradition_replacement_cost_factor = 1.5 +tradition_replacement_cost_factor_tooltip = { + value = tradition_replacement_cost_factor + subtract = 1 + multiply = 100 +} + +tradition_trait_discount = { + value = tradition_base_cost + multiply = -0.5 +} + +tradition_heritage_discount = { + value = tradition_base_cost + multiply = -1 +} + +tradition_replacement_cost_if_relevant = { + value = 1 + if = { + limit = { + scope:replacing = yes + } + multiply = { + value = tradition_replacement_cost_factor + desc = replacing_tradition_cost_penalty_desc + } + } +} + + + +culture_realm_size = { + every_culture_county = { # TODO AO This is an abomination, replace with the below when it works + limit = { + holder = { + OR = { + this = scope:actor + is_vassal_or_below_of = scope:actor + } + } + } + add = 1 + } + #save_temporary_scope_as = the_culture_value + #scope:actor = { + # every_sub_realm_county = { + # limit = { culture = scope:the_culture_value } + # add = 1 + # } + #} +} + +culture_realm_size_larger_30_percent = { + add = culture_realm_size + multiply = 1.3 +} + +culture_realm_size_cost_scopes = { + every_culture_county = { # TODO AO This is an abomination, replace with the below when it works + limit = { + holder = { + OR = { + this = root + is_vassal_or_below_of = root + } + } + } + add = 1 + } + #save_temporary_scope_as = the_culture_value + #root = { + # every_sub_realm_county = { + # limit = { culture = scope:the_culture_value } + # add = 1 + # } + #} +} + +culture_size = { + every_culture_county = { + add = 1 + } +} + +culture_size_penalty = { + value = 0 + add = { + add = scope:culture.culture_realm_size_cost_scopes + subtract = root.culture.culture_realm_size_cost_scopes + multiply = 50 + } +} + +divergence_yearly_chance = { + value = 5 + if = { + limit = { + has_game_rule = less_common_divergent_culture_ai_frequency + } + multiply = 0.2 + } + if = { + limit = { + has_game_rule = relaxed_divergent_culture_ai_frequency + } + multiply = 1.25 + } + if = { + limit = { + has_game_rule = none_divergent_culture_ai_frequency + } + multiply = 0 + } +} + +# % values used in events +miniscule_positive_culture_acceptance = 2 +low_positive_culture_acceptance = 5 +medium_positive_culture_acceptance = 10 +miniscule_negative_culture_acceptance = -2 +low_negative_culture_acceptance = -5 +medium_negative_culture_acceptance = -10 + +### CULTURAL ACCEPTANCE VALUES ### +miniscule_cultural_acceptance_value = 1 +minor_cultural_acceptance_value = 2.5 +medium_cultural_acceptance_value = 5 +major_cultural_acceptance_value = 10 +massive_cultural_acceptance_value = 15 + +miniscule_cultural_acceptance_gain = miniscule_cultural_acceptance_value +minor_cultural_acceptance_gain = minor_cultural_acceptance_value +medium_cultural_acceptance_gain = medium_cultural_acceptance_value +major_cultural_acceptance_gain = major_cultural_acceptance_value +massive_cultural_acceptance_gain = massive_cultural_acceptance_value + +miniscule_cultural_acceptance_loss = { + add = miniscule_cultural_acceptance_value + multiply = -1 +} +minor_cultural_acceptance_loss = { + add = minor_cultural_acceptance_value + multiply = -1 +} +medium_cultural_acceptance_loss ={ + add = medium_cultural_acceptance_value + multiply = -1 +} +major_cultural_acceptance_loss = { + add = major_cultural_acceptance_value + multiply = -1 +} +massive_cultural_acceptance_loss = { + add = massive_cultural_acceptance_value + multiply = -1 +} + +language_learning_divide_value = 5 + +current_extra_languages = { + value = num_of_known_languages + subtract = 1 +} + +language_soft_cap = { + value = 2 + if = { + limit = { + learning >= language_learning_divide_value + } + add = { + add = learning + divide = language_learning_divide_value + } + } + if = { + limit = { + has_perk = open_minded_perk + } + add = 2 + } + if = { + limit = { + has_perk = smooth_operator_perk + } + add = 1 + } + if = { + limit = { + has_perk = been_there_done_that_perk + } + add = 1 + } + if = { + limit = { + exists = dynasty + dynasty = { + has_dynasty_perk = ep1_culture_legacy_1 + } + } + add = 1 + } + if = { + limit = { + culture = { + has_cultural_parameter = extra_language_cap + } + } + add = 1 + } + if = { + limit = { + culture = { + has_cultural_parameter = extra_language_cap_2 + } + } + add = 1 + } +} + +language_soft_cap_modifier_value = { + value = num_of_known_languages + subtract = language_soft_cap +} + + +## Cultural Tradition values + +grant_independence_prestige_gain_value = { + value = 0 + add = { + every_sub_realm_county = { + add = { + value = 100 + } + } + } +} + +tribal_holding_fort_level_in_jungle_bonus_value = 1 +castle_holding_fort_level_in_jungle_bonus_value = 2 +camel_percentage_trigger_value_desc = 50 +camel_percentage_multiplier_value = { + value = camel_percentage_trigger_value_desc + divide = 100 +} +xenophilic_nr_of_cultures_value = 3 +xenophilic_acceptance_value = 30 +xenophilic_nr_of_cultures_cost_value = 4 +xenophilic_acceptance_cost_value = 40 + +# Remember to sync the below with its corresponding non-scripted value taking parameter. +## Can be found easily by searching for the value name, where it appears as a comment. +longbow_competitions_minimum_archer_maa_value = 1200 + +republican_vassal_interaction_limit = 4 + +family_business_court_poistion_aptitude_bonus = 20 + +court_position_aptitude_family_business_value = { + if = { + limit = { + exists = liege + culture = liege.culture + culture = { has_cultural_parameter = close_family_better_court_positions } + is_close_family_of = liege + } + add = { + value = 20 + desc = tradition_family_entrepreneurship_name + } + } +} + +family_business_councillors_percentage = 10 +legalistic_vassal_punishment_acceptance = 20 +maritime_mercantilism_coastal_holdings_value = 0.10 +maritime_mercantilism_coastal_holdings_value_tt = { + value = maritime_mercantilism_coastal_holdings_value + multiply = 100 +} + +# Score for a given court language +# Referenced by code! +# Only used by the AI +# Numbers get truncated; 10.3 and 10.4 is the same score +# root = ruler +# scope:target = ruler to copy language from +# scope:my_language_counties = counties in the AI's realm with a culture with their native language +# scope:their_language_counties = counties in the AI's realm with a culture with the target court language +# scope:total_counties = counties in the AI's realm +# scope:courts_with_language = how many royal courts use the same court language? Includes the target +# scope:checking_native_language = are we scoring our own language? +# See also the can_adopt_court_language scripted rule +court_language_ai_score = { + add = scope:their_language_counties + + # Bit of relative score for percentage too + add = { + value = scope:their_language_counties + multiply = 10 + divide = scope:total_counties + } + if = { + limit = { scope:checking_native_language = no } + subtract = scope:my_language_counties + } + + #Adjust for Court Grandeur. + #World religions primarily cares about other courts that share their faith. + add = { + value = 0 + if = { #Islamic rulers cares about islamic courts + limit = { + faith.religion = religion:islam_religion + scope:target.faith.religion = religion:islam_religion + } + add = { + value = scope:target.court_grandeur_current + if = { #Reduce further if not same faith + limit = { + NOT = { faith = scope:target.faith } + } + divide = 2 + } + } + } + else_if = { #Christian cares about other Christians - especially of the same faith + limit = { + faith.religion = religion:christianity_religion + scope:target.faith.religion = religion:christianity_religion + } + add = { + value = scope:target.court_grandeur_current + if = { #Reduce further if not same faith + limit = { + NOT = { faith = scope:target.faith } + } + divide = 3 + } + } + } + else_if = { #Eastern Faiths + limit = { + OR = { + faith.religion = religion:hinduism_religion + faith.religion = religion:buddhism_religion + faith.religion = religion:jainism_religion + } + OR = { + scope:target.faith.religion = religion:hinduism_religion + scope:target.faith.religion = religion:buddhism_religion + scope:target.faith.religion = religion:jainism_religion + } + } + add = { + value = scope:target.court_grandeur_current + if = { #Reduce further if not same Religion + limit = { + NOT = { faith.religion = scope:target.faith.religion } + } + divide = 2 + } + } + } + else_if = { #Abrahamic religion matching vs non co-religionist - CGV Ignored + limit = { + OR = { + faith.religion = religion:islam_religion + faith.religion = religion:christianity_religion + } + NOT = { faith.religion = scope:target.faith.religion } + } + #Add nothing + } + else_if = { #Eastern religion matching vs non Eastern religion - CGV Ignored + limit = { + OR = { + faith.religion = religion:hinduism_religion + faith.religion = religion:buddhism_religion + faith.religion = religion:jainism_religion + } + NOR = { + scope:target.faith.religion = religion:hinduism_religion + scope:target.faith.religion = religion:buddhism_religion + scope:target.faith.religion = religion:jainism_religion + } + } + #Add nothing + } + else = { #Everyone else just cares about the Grandeur directly + add = scope:target.court_grandeur_current + } + } + + + #Increase from number of other courts using the Language (1.5 per court). + add = { + value = scope:courts_with_language + multiply = 1.5 + } + + #Arbitrary Geographical Bias - if our courts are not in the same region the score is divided by 2. + divide = { + value = 1 + if = { + limit = { + OR = { + #Europe: + AND = { + capital_province = { geographical_region = world_europe_west_britannia } + NOT = { scope:target.capital_province = { geographical_region = world_europe_west_britannia } } + } + AND = { + capital_province = { geographical_region = world_europe_west_germania } + NOT = { scope:target.capital_province = { geographical_region = world_europe_west_germania } } + } + AND = { + capital_province = { geographical_region = world_europe_west_francia } + NOT = { scope:target.capital_province = { geographical_region = world_europe_west_francia } } + } + AND = { + capital_province = { geographical_region = world_europe_west_iberia } + NOT = { scope:target.capital_province = { geographical_region = world_europe_west_iberia } } + } + AND = { + capital_province = { geographical_region = world_europe_north } + NOT = { scope:target.capital_province = { geographical_region = world_europe_north } } + } + AND = { + capital_province = { geographical_region = world_europe_south_east } + NOT = { scope:target.capital_province = { geographical_region = world_europe_south_east } } + } + AND = { + capital_province = { geographical_region = world_europe_south_italy } + NOT = { scope:target.capital_province = { geographical_region = world_europe_south_italy } } + } + #South Asia: + AND = { + capital_province = { geographical_region = world_india_rajastan } + scope:target.capital_province = { geographical_region = world_india_rajastan } + } + AND = { + capital_province = { geographical_region = world_india_bengal } + NOT = { scope:target.capital_province = { geographical_region = world_india_bengal } } + } + AND = { + capital_province = { geographical_region = world_india_deccan } + NOT = { scope:target.capital_province = { geographical_region = world_india_deccan } } + } + AND = { + capital_province = { geographical_region = world_burma } + NOT = { scope:target.capital_province = { geographical_region = world_burma } } + } + AND = { + capital_province = { geographical_region = world_himalaya } + NOT = { scope:target.capital_province = { geographical_region = world_himalaya } } + } + AND = { + capital_province = { geographical_region = world_middle_east } + NOT = { scope:target.capital_province = { geographical_region = world_middle_east } } + } + AND = { + capital_province = { geographical_region = world_middle_east_persia } + NOT = { scope:target.capital_province = { geographical_region = world_middle_east_persia } } + } + #Africa + AND = { + capital_province = { geographical_region = world_africa_north } + NOT = { scope:target.capital_province = { geographical_region = world_africa_north } } + } + AND = { + capital_province = { geographical_region = world_africa_west } + NOT = { scope:target.capital_province = { geographical_region = world_africa_west } } + } + AND = { + capital_province = { geographical_region = world_africa_east } + NOT = { scope:target.capital_province = { geographical_region = world_africa_east } } + } + #Central Asia + AND = { + capital_province = { geographical_region = world_steppe_west } + NOT = { scope:target.capital_province = { geographical_region = world_steppe_west } } + } + AND = { + capital_province = { geographical_region = world_steppe_east } + NOT = { scope:target.capital_province = { geographical_region = world_steppe_east } } + } + AND = { + capital_province = { geographical_region = world_tibet } + NOT = { scope:target.capital_province = { geographical_region = world_tibet } } + } + } + } + add = 1 + } + } + + # Prefer the status quo slightly. Needs to be last + if = { + limit = { + scope:checking_native_language = yes + has_court_language_of_culture = culture + } + multiply = 1.5 + } + else_if = { + limit = { + scope:checking_native_language = no + scope:target = { has_royal_court = yes } + has_same_court_language = scope:target + } + multiply = 1.5 + } +} + +gold_per_culture_county_in_subrealm = { + value = 0 + add = { + scope:vassal_speaking_other_language = { + every_sub_realm_county = { + limit = { + culture = scope:vassal_speaking_other_language.culture + } + add = 50 + } + } + } +} + +## Culture Event Values + +culture_tradition_events_0101_tutor_surcharge_value = { value = major_gold_value } + +non_tribal_loot_value = { + value = root.var:raid_loot + multiply = not_tribal_raid_prestige_multiplier + multiply = -1 +} + +tradition_travel_discount = { + value = -1000 +} + +tradition_tournament_discount = { + value = -2000 +} + +traditionalist_discount = { + value = -1500 +} + +court_position_aptitude_eunuch_tradition_value = { + if = { + limit = { + exists = liege + liege.culture = { + has_cultural_parameter = eunuch_trait_bonuses + } + has_trait = eunuch_1 + } + add = { + value = 30 + desc = court_position_eunuch_trait + } + } + else_if = { + limit = { + exists = liege + liege.culture = { + has_cultural_parameter = eunuch_trait_bonuses + } + has_trait = beardless_eunuch + } + add = { + value = 30 + desc = court_position_beardless_eunuch_trait + } + } +} + +court_position_aptitude_boon_voyager_trait = { + if = { + limit = { + employer ?= { + is_landless_adventurer = no + has_perk = gracious_host_impeccable_guest_perk + } + } + add = { + value = { + value = 3 + multiply = employer.num_of_known_languages + } + desc = gracious_host_impeccable_guest_perk_bonus + } + } +} diff --git a/common/script_values/00_diarchy_values.txt b/common/script_values/00_diarchy_values.txt new file mode 100644 index 00000000..a9f99950 --- /dev/null +++ b/common/script_values/00_diarchy_values.txt @@ -0,0 +1,3549 @@ +############# +# Diarchy Scripted Values +############# + +################################################## +# General Values + +raise_diarch_opinion_with_loyalty_update_value = { + value = diarch_loyalty + add = scope:opinion_amount +} + +diarch_wants_more_swing_event_threshold_value = 90 + +adult_co_ruler_power_balance_scaling_value = { + value = 50 + + # If our liege would have a regency, trend towards max. + if = { + limit = { + liege = { regency_for_personal_reasons_trigger = yes } + } + add = 50 + } + # Likewise, if the co-ruler would be disabled, trend towards min. + else_if = { + limit = { is_diarch_able_trigger = no } + add = -50 + } +} + +################################################## +# Diarch Loyalty Values + +diarch_loyalty_visibly_loyal_threshold = 75 +diarch_loyalty_visibly_disloyal_threshold = 25 + +diarch_loyalty_score_add_minor_value = 10 +diarch_loyalty_score_add_medium_value = 25 +diarch_loyalty_score_add_major_value = 50 +diarch_loyalty_score_add_massive_value = 100 +diarch_loyalty_score_add_omega_value = 1000 + +diarch_loyalty_score_add_minor_gain = diarch_loyalty_score_add_minor_value +diarch_loyalty_score_add_medium_gain = diarch_loyalty_score_add_medium_value +diarch_loyalty_score_add_major_gain = diarch_loyalty_score_add_major_value +diarch_loyalty_score_add_massive_gain = diarch_loyalty_score_add_massive_value +diarch_loyalty_score_add_omega_gain = diarch_loyalty_score_add_omega_value + +diarch_loyalty_score_add_minor_loss = { + value = diarch_loyalty_score_add_minor_value + multiply = -1 +} +diarch_loyalty_score_add_medium_loss = { + value = diarch_loyalty_score_add_medium_value + multiply = -1 +} +diarch_loyalty_score_add_major_loss = { + value = diarch_loyalty_score_add_major_value + multiply = -1 +} +diarch_loyalty_score_add_massive_loss = { + value = diarch_loyalty_score_add_massive_value + multiply = -1 +} +diarch_loyalty_score_add_omega_loss = { + value = diarch_loyalty_score_add_omega_value + multiply = -1 +} + +diarch_loyalty_score_type_regency_value = { + ### PLEASE NOTE #### + # It's deliberate design that we don't double up on lots of values between loyalty and succession score (e.g., familial bonuses). + # If the two values become too synced, then you'll either always be fine or else always be screwed. Neither of these are fun or interesting. + # The intention is that societal ties govern your succession score whilst loyalty is more about personal relations and outlook (which is why we pepper in some traits and cultural traditions to break the score up a bit). + + if = { + # For performance reasons, you'll sometimes check this when you don't have a liege, so we need to check beforehand for error purposes. + limit = { exists = liege } + # Add raw opinion. + add = { + desc = diarch_loyalty_score.regency.opinion_of_you + value = "opinion(liege)" + } + # High-Tier Relationships. + add = diarch_loyalty_score_standard_values_high_tier_relationships_value + # Traits. + add = diarch_loyalty_score_standard_values_general_traits_value + # Court Positions. + add = diarch_loyalty_score_standard_values_general_court_positions_value + # Cultural Traditions. + add = diarch_loyalty_score_standard_values_general_culture_value + # Sympathies. + ## General factors. + add = diarch_loyalty_score_standard_values_general_sympathies_value + ## Dread factors in in temporary regencies. + if = { + limit = { + liege = { + dread >= 1 + has_diarchy_active_parameter = diarchy_type_is_temporary_regency + } + has_dread_level_towards = { + target = liege + level >= 1 + } + } + add = { + desc = diarch_loyalty_score.regency.temporary_regency.dread + value = { + value = liege.dread + # Weight up if they're a basic natural coward. + if = { + limit = { + has_dread_level_towards = { + target = liege + level >= 2 + } + } + multiply = 2 + } + } + } + } + # Overrides. + ## Loyalty overrides. + add = diarch_loyalty_score_standard_values_overrides_loyalty_value + # Voyager Perk + add = diarch_loyalty_score_value_power_at_home_perk_value + } +} + +diarch_loyalty_score_type_vizierate_value = { + ### PLEASE NOTE #### + # It's deliberate design that we don't double up on lots of values between loyalty and succession score (e.g., familial bonuses). + # If the two values become too synced, then you'll either always be fine or else always be screwed. Neither of these are fun or interesting. + # The intention is that societal ties govern your succession score whilst loyalty is more about personal relations and outlook (which is why we pepper in some traits and cultural traditions to break the score up a bit). + + if = { + # For performance reasons, you'll sometimes check this when you don't have a liege, so we need to check beforehand for error purposes. + limit = { exists = liege } + # Add raw opinion. + add = { + desc = diarch_loyalty_score.regency.opinion_of_you + value = "opinion(liege)" + } + # High-Tier Relationships. + add = diarch_loyalty_score_standard_values_high_tier_relationships_value + # Traits. + add = diarch_loyalty_score_standard_values_general_traits_value + # Court Positions. + add = diarch_loyalty_score_standard_values_general_court_positions_value + # Cultural Traditions. + add = diarch_loyalty_score_standard_values_general_culture_value + # Sympathies. + ## General factors. + add = diarch_loyalty_score_standard_values_general_sympathies_value + # Overrides. + ## Loyalty overrides. + add = diarch_loyalty_score_standard_values_overrides_loyalty_value + } +} + +diarch_loyalty_score_type_co_emperorship_value = { + ### PLEASE NOTE #### + # As there's no succession for co-emperors, we can afford to be a bit more direct with the values affecting them vs. other types of diarchy, so here (and specifically here) it's fine to lump w/e in. + + if = { + # For performance reasons, you'll sometimes check this when you don't have a liege, so we need to check beforehand for error purposes. + limit = { exists = liege } + # Add raw opinion. + add = { + desc = diarch_loyalty_score.regency.opinion_of_you + value = "opinion(liege)" + } + # How likely are we to be heir? + ## Fancy non-standard values in use. + add = diarch_loyalty_score_esoteric_values_heirage_situation_value + # High-Tier Relationships. + add = diarch_loyalty_score_standard_values_high_tier_relationships_value + # Traits. + ## Fancy non-standard values in use. + add = diarch_loyalty_score_esoteric_values_co_rulership_traits_value + # Court Positions. + add = diarch_loyalty_score_standard_values_general_court_positions_value + # Cultural Traditions. + add = diarch_loyalty_score_standard_values_general_culture_value + # Sympathies. + ## General factors. + add = diarch_loyalty_score_standard_values_general_sympathies_value + ## Dread. + if = { + limit = { + liege.dread >= 1 + has_dread_level_towards = { + target = liege + level >= 1 + } + } + add = { + desc = diarch_loyalty_score.co_rule.co_emperorship.dread + value = { + value = liege.dread + # Weight up if they're a basic natural coward. + if = { + limit = { + has_dread_level_towards = { + target = liege + level >= 2 + } + } + multiply = 2 + } + } + } + } + # Overrides. + ## Loyalty overrides. + add = diarch_loyalty_score_standard_values_overrides_loyalty_value + } +} + +diarch_loyalty_score_standard_values_general_sympathies_value = { + # Compassion if liege is helpless. + if = { + limit = { + liege = { + OR = { + is_incapable = yes + is_adult = no + } + } + } + add = { + desc = diarch_loyalty_score.regency.compassion_for_helpless + value = root.ai_compassion + } + } + # Tyranny. + if = { + limit = { liege.tyranny >= 1 } + add = { + desc = diarch_loyalty_score.regency.tyranny + value = { + value = liege.tyranny + multiply = -1 + } + } + } +} + +diarch_loyalty_score_standard_values_general_culture_value = { + culture = { + # +++ Malleable Subjects. + if = { + limit = { has_cultural_tradition = tradition_fp2_malleable_subjects } + add = { + desc = diarch_loyalty_score.regency.tradition_fp2_malleable_subjects + value = diarch_loyalty_score_add_major_gain + } + } + # +++ Recognition of Talent & lowborn. + if = { + limit = { + has_cultural_tradition = tradition_talent_acquisition + root = { is_lowborn = yes } + } + add = { + desc = diarch_loyalty_score.regency.tradition_talent_acquisition + value = diarch_loyalty_score_add_major_gain + } + } + # ++/-- Astute Diplomats & they like or dislike their liege. + if = { + limit = { has_cultural_tradition = tradition_astute_diplomats } + # If they like you, they work loyally. + if = { + limit = { + root = { + opinion = { + target = liege + value >= 1 + } + } + } + add = { + desc = diarch_loyalty_score.regency.tradition_astute_diplomats.positive + value = diarch_loyalty_score_add_medium_gain + } + } + # If they don't, they work against you. + else_if = { + limit = { + root = { + opinion = { + target = liege + value <= -1 + } + } + } + add = { + desc = diarch_loyalty_score.regency.tradition_astute_diplomats.negative + value = diarch_loyalty_score_add_medium_loss + } + } + # Else neutral, so they're ambivalent. + } + # ++ Ruling Caste & is liege. + if = { + limit = { + root.liege.culture = { + has_cultural_tradition = tradition_ruling_caste + # But only apply it to diff-cultured characters. + NOT = { this = root.culture } + } + } + add = { + desc = diarch_loyalty_score.regency.tradition_ruling_caste + value = diarch_loyalty_score_add_medium_gain + } + } + # ++ Family Business & extended family. + if = { + limit = { + has_cultural_tradition = tradition_family_entrepreneurship + root = { is_close_or_extended_family_of = liege } + } + add = { + desc = diarch_loyalty_score.regency.tradition_family_entrepreneurship + value = diarch_loyalty_score_add_medium_gain + } + } + # + Hereditary Hierarchy. + if = { + limit = { has_cultural_tradition = tradition_hereditary_hierarchy } + add = { + desc = diarch_loyalty_score.regency.tradition_hereditary_hierarchy + value = diarch_loyalty_score_add_minor_gain + } + } + # + Tribal Unity & same-house. + if = { + limit = { + has_cultural_tradition = tradition_tribe_unity + exists = root.liege.house + root.house ?= root.liege.house + } + add = { + desc = diarch_loyalty_score.regency.tradition_tribe_unity + value = diarch_loyalty_score_add_minor_gain + } + } + # + Strong Kinship & same-house. + if = { + limit = { + has_cultural_tradition = tradition_strong_kinship + exists = root.liege.house + root.house ?= root.liege.house + } + add = { + desc = diarch_loyalty_score.regency.tradition_strong_kinship + value = diarch_loyalty_score_add_minor_gain + } + } + # +/- Chivalry & variable depending on "honour". + if = { + limit = { has_cultural_tradition = tradition_chivalry } + # If dishonourable... + if = { + limit = { + root.liege = { + OR = { + tyranny >= 1 + prestige_level <= 0 + has_any_shunned_or_criminal_trait_in_faith_trigger = { + CHARACTER = liege + FAITH = root.faith + } + # We avoid the actual ai_honour stat because it's a bit less exposed to the player. + } + } + } + add = { + desc = diarch_loyalty_score.regency.tradition_chivalry.loss + value = diarch_loyalty_score_add_minor_loss + } + } + # Else, honourable enough. + else = { + add = { + desc = diarch_loyalty_score.regency.tradition_chivalry.gain + value = diarch_loyalty_score_add_minor_gain + } + } + } + # + Philosopher Culture & learning education. + if = { + limit = { + has_cultural_tradition = tradition_philosopher_culture + root = { has_trait = education_learning } + } + add = { + desc = diarch_loyalty_score.regency.tradition_philosopher_culture + value = diarch_loyalty_score_add_minor_gain + } + } + # -1 (and only 1) if Vegetarian & liege isn't also vegetarian. + ## This one goes out to our dear D.M. for everything he's ever said at lunch. + if = { + limit = { + has_cultural_tradition = tradition_vegetarianism + # ^We're deliberately only checking culture rather than faith here — not wanting to mock religious convictions. + ## Just personal ones. + root.liege = { is_vegetarian_trigger = no } + } + add = { + desc = diarch_loyalty_score.regency.tradition_vegetarianism + value = -1 + } + } + # -- Eye for an Eye. + if = { + limit = { has_cultural_tradition = tradition_eye_for_an_eye } + add = { + desc = diarch_loyalty_score.regency.tradition_eye_for_an_eye + value = diarch_loyalty_score_add_medium_loss + } + } + # -- Byzantine Traditions. + if = { + limit = { has_cultural_tradition = tradition_byzantine_succession } + add = { + desc = diarch_loyalty_score.regency.tradition_byzantine_succession + value = diarch_loyalty_score_add_medium_loss + } + } + # -- EP3 Byzantines + if = { + limit = { has_cultural_tradition = tradition_ep3_palace_politics } + add = { + desc = diarch_loyalty_score.regency.tradition_ep3_palace_politics + value = diarch_loyalty_score_add_medium_loss + } + } + # -- Warrior Culture & non-martially educated lieges. + if = { + limit = { + has_cultural_tradition = tradition_warrior_culture + root.liege = { + NOR = { + has_trait = education_martial + has_focus = education_martial + } + } + } + add = { + desc = diarch_loyalty_score.regency.tradition_warrior_culture + value = diarch_loyalty_score_add_medium_loss + } + } + # --- Practiced Pirates. + if = { + limit = { has_cultural_tradition = tradition_practiced_pirates } + add = { + desc = diarch_loyalty_score.regency.tradition_practiced_pirates + value = diarch_loyalty_score_add_major_loss + } + } + # --- Bound by Faith & different faiths. + if = { + limit = { + has_cultural_tradition = tradition_faith_bound + NOT = { root.faith = root.liege.faith } + } + add = { + desc = diarch_loyalty_score.regency.tradition_faith_bound + value = diarch_loyalty_score_add_major_loss + } + } + } +} + +diarch_loyalty_score_standard_values_general_court_positions_value = { + # Court Positions. + ## ++ Chief Eunuch. + if = { + limit = { has_court_position = chief_eunuch_court_position } + add = { + desc = diarch_loyalty_score.regency.chief_eunuch + value = diarch_loyalty_score_add_medium_gain + } + } + ## ++ Chief Qadi. + if = { + limit = { has_court_position = chief_qadi_court_position } + add = { + desc = diarch_loyalty_score.regency.chief_qadi + value = diarch_loyalty_score_add_medium_gain + } + } +} + +diarch_loyalty_score_standard_values_general_traits_value = { + # Traits. + ## + Lazy. + if = { + limit = { has_trait = lazy } + add = { + desc = diarch_loyalty_score.regency.lazy + value = diarch_loyalty_score_add_minor_gain + } + } + ## ++/-- Diligent. + ### ++ If they like you... + else_if = { + limit = { + has_trait = diligent + opinion = { + target = liege + value >= 1 + } + } + add = { + desc = diarch_loyalty_score.regency.diligent.positive + value = diarch_loyalty_score_add_medium_gain + } + } + ### -- If they dislike you... + else_if = { + limit = { + has_trait = diligent + opinion = { + target = liege + value <= -1 + } + } + add = { + desc = diarch_loyalty_score.regency.diligent.negative + value = diarch_loyalty_score_add_medium_loss + } + } + ### ... and perfectly-neutral diligent characters do nothing extra about it. They are ambivalent. + ## ++ Craven. + if = { + limit = { has_trait = craven } + add = { + desc = diarch_loyalty_score.regency.craven + value = diarch_loyalty_score_add_medium_gain + } + } + ## ++ Honest. + if = { + limit = { has_trait = honest } + add = { + desc = diarch_loyalty_score.regency.honest + value = diarch_loyalty_score_add_medium_gain + } + } + ## -- Deceitful. + else_if = { + limit = { has_trait = deceitful } + add = { + desc = diarch_loyalty_score.regency.deceitful + value = diarch_loyalty_score_add_medium_loss + } + } + ## +++ Content. + if = { + limit = { has_trait = content } + add = { + desc = diarch_loyalty_score.regency.content + value = diarch_loyalty_score_add_major_gain + } + } + ## --- Ambitious. + else_if = { + limit = { has_trait = ambitious } + add = { + desc = diarch_loyalty_score.regency.ambitious + value = diarch_loyalty_score_add_major_loss + } + } + ## -- Arbitrary. + if = { + limit = { has_trait = arbitrary } + add = { + desc = diarch_loyalty_score.regency.arbitrary + value = diarch_loyalty_score_add_medium_loss + } + } + ## ++ Just. + else_if = { + limit = { has_trait = just } + add = { + desc = diarch_loyalty_score.regency.just + value = diarch_loyalty_score_add_medium_gain + } + } + ## --- Disloyal. + if = { + limit = { has_trait = disloyal } + add = { + desc = diarch_loyalty_score.regency.disloyal + value = diarch_loyalty_score_add_major_loss + } + } + ## +++ Loyal. + else_if = { + limit = { has_trait = loyal } + add = { + desc = diarch_loyalty_score.regency.loyal + value = diarch_loyalty_score_add_major_gain + } + } +} + +diarch_loyalty_score_standard_values_high_tier_relationships_value = { + # We don't take the basic tier relationships into account because they affect opinion heavily, and we don't want to double dip too much unless it seems important. + ## Good. + if = { + limit = { + has_any_best_good_relationship_with_character_trigger = { CHARACTER = liege } + } + add = { + desc = diarch_loyalty_score_power_at_home_perk + value = diarch_loyalty_score_add_medium_gain + } + } + ## Bad. + if = { + limit = { + has_any_worst_bad_relationship_with_character_trigger = { CHARACTER = liege } + } + add = { + desc = diarch_loyalty_score.regency.your_negative_relation + value = diarch_loyalty_score_add_massive_loss + } + } +} + +diarch_loyalty_score_standard_values_overrides_loyalty_value = { + # Everyone has a breaking point, so if they categorically hate you, we reduce it down. + if = { + limit = { + opinion = { + target = liege + value <= -100 + } + OR = { + has_hook_of_type = { + target = root + type = loyalty_hook + } + has_hook_of_type = { + target = root + type = predecessor_loyalty_hook + } + ai_honor >= max_positive_honor + } + } + add = { + desc = diarch_loyalty_score.regency.override_negated + value = diarch_loyalty_score_add_major_gain + } + } + # Loyalty hooks of any kind mean the diarch will always be unfailingly loyal in their duties. + ## Standard loyalty. + else_if = { + limit = { + liege = { + has_hook_of_type = { + target = root + type = loyalty_hook + } + } + } + add = { + desc = diarch_loyalty_score.regency.loyalty_hook.self + value = diarch_loyalty_score_add_omega_gain + } + } + ## Predecessor loyalty. + else_if = { + limit = { + liege = { + has_hook_of_type = { + target = root + type = predecessor_loyalty_hook + } + } + } + add = { + desc = diarch_loyalty_score.regency.loyalty_hook.predecessor + value = diarch_loyalty_score_add_omega_gain + } + } + # And, per request, if the character is unfailingly honourable then they will also always be loyal. + else_if = { + limit = { ai_honor >= max_positive_honor } + add = { + desc = diarch_loyalty_score.regency.ai_honour + value = diarch_loyalty_score_add_omega_gain + } + } +} + +diarch_loyalty_score_value_power_at_home_perk_value = { + if = { + limit = { + liege ?= { + has_perk = power_at_home_perk + is_travelling = yes + } + } + add = { + desc = diarch_loyalty_score_power_at_home_perk + value = diarch_loyalty_score_add_medium_gain + } + } +} + +# Similar to the usual traits value but with _much_ more extreme responses to some traits. +diarch_loyalty_score_esoteric_values_co_rulership_traits_value = { + # Traits. + ## + Lazy. + if = { + limit = { has_trait = lazy } + add = { + desc = diarch_loyalty_score.regency.lazy + value = diarch_loyalty_score_add_minor_gain + } + } + ## ++/--- Diligent. + ### ++ If they like you... + else_if = { + limit = { + has_trait = diligent + opinion = { + target = liege + value >= 1 + } + } + add = { + desc = diarch_loyalty_score.regency.diligent.positive + value = diarch_loyalty_score_add_medium_gain + } + } + ### --- If they dislike you... + else_if = { + limit = { + has_trait = diligent + opinion = { + target = liege + value <= -1 + } + } + add = { + desc = diarch_loyalty_score.regency.diligent.negative + value = diarch_loyalty_score_add_major_loss + } + } + ### ... and perfectly-neutral diligent characters do nothing extra about it. They are ambivalent. + ## ++ Craven. + if = { + limit = { has_trait = craven } + add = { + desc = diarch_loyalty_score.regency.craven + value = diarch_loyalty_score_add_medium_gain + } + } + ## ++ Honest. + if = { + limit = { has_trait = honest } + add = { + desc = diarch_loyalty_score.regency.honest + value = diarch_loyalty_score_add_medium_gain + } + } + ## --- Deceitful. + else_if = { + limit = { has_trait = deceitful } + add = { + desc = diarch_loyalty_score.regency.deceitful + value = diarch_loyalty_score_add_major_loss + } + } + ## +++ Content. + if = { + limit = { has_trait = content } + add = { + desc = diarch_loyalty_score.regency.content + value = diarch_loyalty_score_add_major_gain + } + } + ## ---- Ambitious. + else_if = { + limit = { has_trait = ambitious } + add = { + desc = diarch_loyalty_score.regency.ambitious + value = diarch_loyalty_score_add_massive_loss + } + } + ## --- Arbitrary. + if = { + limit = { has_trait = arbitrary } + add = { + desc = diarch_loyalty_score.regency.arbitrary + value = diarch_loyalty_score_add_major_loss + } + } + ## ++ Just. + else_if = { + limit = { has_trait = just } + add = { + desc = diarch_loyalty_score.regency.just + value = diarch_loyalty_score_add_medium_gain + } + } + ## ---- Disloyal. + if = { + limit = { has_trait = disloyal } + add = { + desc = diarch_loyalty_score.regency.disloyal + value = diarch_loyalty_score_add_massive_loss + } + } + ## +++ Loyal. + else_if = { + limit = { has_trait = loyal } + add = { + desc = diarch_loyalty_score.regency.loyal + value = diarch_loyalty_score_add_major_gain + } + } + ## ++ Humble. + if = { + limit = { has_trait = humble } + add = { + desc = diarch_loyalty_score.regency.humble + value = diarch_loyalty_score_add_medium_gain + } + } + ## -- Arrogant. + else_if = { + limit = { has_trait = arrogant } + add = { + desc = diarch_loyalty_score.regency.arrogant + value = diarch_loyalty_score_add_medium_loss + } + } + ## ++ Patient. + if = { + limit = { has_trait = patient } + add = { + desc = diarch_loyalty_score.regency.patient + value = diarch_loyalty_score_add_medium_gain + } + } + ## -- Impatient. + else_if = { + limit = { has_trait = impatient } + add = { + desc = diarch_loyalty_score.regency.impatient + value = diarch_loyalty_score_add_medium_loss + } + } +} + +diarch_loyalty_score_esoteric_values_heirage_situation_value = { + # Designated heirs feel happy for it. + if = { + limit = { liege.designated_heir ?= root } + # Designated heirs are happy for it. + add = { + desc = diarch_loyalty_score.co_rulership.designated_heir + value = 25 + } + } + # Unless we have a few specific traits, we get impatient for power over time. + if = { + limit = { + OR = { + # Something that makes us patient. + NOR = { + has_trait = patient + has_trait = content + has_trait = humble + has_trait = loyal + } + # Without something that stops us being impatient. + OR = { + has_trait = impatient + has_trait = ambitious + has_trait = arrogant + has_trait = disloyal + } + } + } + # Dedicating this section of the script to Ol' Charlie Boy. + add = { + desc = diarch_loyalty_score.co_rulership.years_waiting + value = { + value = years_as_diarch + multiply = -2 + } + } + # Bonus if we're much younger than them/malus if older. + if = { + limit = { age != liege.age } + add = { + desc = diarch_loyalty_score.co_rulership.age_difference + value = { + value = liege.age + subtract = age + } + } + } + # Same again for health. + ## 85+. + if = { + limit = { + liege.age >= 85 + liege.health >= medium_health + } + add = { + desc = diarch_loyalty_score.co_rulership.just_die_already + value = -55 + } + } + ## 80+. + else_if = { + limit = { + liege.age >= 80 + liege.health >= medium_health + } + add = { + desc = diarch_loyalty_score.co_rulership.your_time_is_up + value = -45 + } + } + ## 75+. + else_if = { + limit = { + liege.age >= 75 + liege.health >= medium_health + } + add = { + desc = diarch_loyalty_score.co_rulership.you_are_too_fit + value = -35 + } + } + ## 70+. + else_if = { + limit = { + liege.age >= 70 + liege.health >= medium_health + } + add = { + desc = diarch_loyalty_score.co_rulership.you_are_too_fit + value = -25 + } + } + ## 65+. + else_if = { + limit = { + liege.age >= 65 + liege.health >= medium_health + } + add = { + desc = diarch_loyalty_score.co_rulership.you_are_too_fit + value = -15 + } + } + ## 55+. + else_if = { + limit = { + liege.age >= 55 + liege.health >= medium_health + } + add = { + desc = diarch_loyalty_score.co_rulership.showing_no_signs_of_slowing + value = -5 + } + } + # But if we're unhealthy, ignore it — we've got other stuff to worry about. + } +} + +regent_loyal_after_death_hook_duration_years_value = { + value = 21 + subtract = root.primary_heir.age +} + +historic_regent_loyal_after_death_hook_duration_years_char_214_value = { + value = 21 + subtract = character:214.age +} + +################################################## +# Diarchy Succession Candidate Values + +# These need to be whole numbers or the UI'll get _weird_. +miniscule_diarch_candidate_value = 1 +minor_diarch_candidate_value = 2 +medium_diarch_candidate_value = 6 +major_diarch_candidate_value = 14 +massive_diarch_candidate_value = 22 +monumental_diarch_candidate_value = 33 + +miniscule_diarch_candidate_gain = miniscule_diarch_candidate_value +minor_diarch_candidate_gain = minor_diarch_candidate_value +medium_diarch_candidate_gain = medium_diarch_candidate_value +major_diarch_candidate_gain = major_diarch_candidate_value +massive_diarch_candidate_gain = massive_diarch_candidate_value +monumental_diarch_candidate_gain = monumental_diarch_candidate_value + +miniscule_diarch_candidate_loss = { + value = miniscule_diarch_candidate_value + multiply = -1 +} +minor_diarch_candidate_loss = { + value = minor_diarch_candidate_value + multiply = -1 +} +medium_diarch_candidate_loss = { + value = medium_diarch_candidate_value + multiply = -1 +} +major_diarch_candidate_loss = { + value = major_diarch_candidate_value + multiply = -1 +} +massive_diarch_candidate_loss = { + value = massive_diarch_candidate_value + multiply = -1 +} +monumental_diarch_candidate_loss = { + value = monumental_diarch_candidate_value + multiply = -1 +} + +hard_disable_diarch_candidate_value = -1000 + +diarchy_succession_court_type_baseline_value = 10 +diarchy_succession_competence_baseline_value = 5 + +diarchy_regent_succession_score_value = { + if = { + # For performance reasons, you'll sometimes check this when you don't have a liege, so we need to check beforehand for error purposes. + limit = { exists = liege } + # We increase the importance of family if the liege is underage or an imbecile. + if = { + limit = { + liege = { + OR = { + is_adult = no + is_incapable = yes + } + } + any_close_or_extended_family_member = { this = liege } + } + # Ruling characters get a bit less, as they have other duties. + if = { + limit = { is_ruler = yes } + add = { + value = massive_diarch_candidate_gain + desc = diarch_succession_score.diarchy_specific.regency.close_or_extended_family_of_invalid.ruler + } + } + # Whereas non-rulers get a mega-boost, as they can be there all the time + else = { + add = { + value = monumental_diarch_candidate_gain + desc = diarch_succession_score.diarchy_specific.regency.close_or_extended_family_of_invalid.non_ruler + } + } + } + # Familial ties. + ## If you engage in hyper-incest and break your own regency succession, don't come crying to the devs. You have done this to yourself. + add = { + desc = diarch_succession_score.category.familial_ties + # ADD SCORE + ## Is parent of + if = { + limit = { is_parent_of = liege } + add = { + value = massive_diarch_candidate_gain + desc = diarch_succession_score.familial_ties.your_parent + } + } + ## Is child of + if = { + limit = { is_child_of = liege } + add = { + value = major_diarch_candidate_gain + desc = diarch_succession_score.familial_ties.your_child + } + } + ## Is sibling of + if = { + limit = { is_sibling_of = liege } + add = { + value = major_diarch_candidate_gain + desc = diarch_succession_score.familial_ties.your_sibling + } + } + ## Is grandparent of + if = { + limit = { is_grandparent_of = liege } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.familial_ties.your_grandparent + } + } + ## Is grandchild of + if = { + limit = { is_grandchild_of = liege } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.familial_ties.your_grandchild + } + } + ## Is uncle/aunt of + if = { + limit = { is_uncle_or_aunt_of = liege } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.familial_ties.your_auntuncle + } + } + ## Is nibling of + if = { + limit = { is_nibling_of = liege } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.familial_ties.your_nibling + } + } + ## Is cousin of + if = { + limit = { is_cousin_of = liege } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.familial_ties.your_cousin + } + } + ## Is great grandparent of + if = { + limit = { is_great_grandparent_of = liege } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.familial_ties.your_greatgrandparent + } + } + ## Is great grandchild of + if = { + limit = { is_great_grandchild_of = liege } + add = { + value = miniscule_diarch_candidate_gain + desc = diarch_succession_score.familial_ties.yourgreat_grandchild + } + } + } + # Personal ties. + add = { + desc = diarch_succession_score.category.personal_ties + # ADD SCORE + ## Is your heir + if = { + limit = { + exists = liege.primary_heir + this = liege.primary_heir + } + add = { + value = massive_diarch_candidate_gain + desc = diarch_succession_score.personal_ties.your_heir + } + } + ## Is spouse of + if = { + limit = { is_spouse_of = liege } + add = { + value = massive_diarch_candidate_gain + desc = diarch_succession_score.personal_ties.your_spouse + } + } + ## Is guardian of + if = { + limit = { has_relation_ward = liege } + add = { + value = massive_diarch_candidate_gain + desc = diarch_succession_score.personal_ties.your_ward + } + } + ## Has a seat on your council + if = { + limit = { is_councillor_of = liege } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.personal_ties.your_councillor + } + } + ## Is powerful vassal of + if = { + limit = { is_powerful_vassal = yes } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.personal_ties.your_powerful_vassal + } + } + ### Has positive opinion + #if = { + # limit = { + # opinion = { + # target = liege + # value >= medium_positive_opinion + # } + # } + # add = { + # value = miniscule_diarch_candidate_gain + # desc = diarch_succession_score.personal_ties.likes_you + # } + #} + ## Has positive relationship + if = { + limit = { + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = liege } + } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.personal_ties.your_positive_relation + } + } + # REMOVE SCORE + ## Is your nemesis + if = { + limit = { + has_any_worst_bad_relationship_with_character_trigger = { CHARACTER = liege } + } + add = { + value = major_diarch_candidate_loss + desc = diarch_succession_score.personal_ties.your_nemesis + } + } + ## Has a moderate bad relationship + if = { + limit = { + has_any_only_moderate_bad_relationship_with_character_trigger = { CHARACTER = liege } + } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.personal_ties.your_negative_relation + } + } + ### Has negative opinion + #if = { + # limit = { + # opinion = { + # target = liege + # value <= medium_negative_opinion + # } + # } + # add = { + # value = miniscule_diarch_candidate_loss + # desc = diarch_succession_score.personal_ties.dislikes_you + # } + #} + } + # Societal bonds. + add = { + desc = diarch_succession_score.category.societal_bonds + # ADD SCORE + ## Is in your house + if = { + limit = { + exists = house + house = liege.house + } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.societal_bonds.your_house + } + } + ## Is in your dynasty + if = { + limit = { + exists = house + # Filter out same-house chars to avoid double-dipping. + NOT = { house = liege.house } + # So we _only_ want same dynasty chars. + dynasty = liege.dynasty + } + add = { + value = miniscule_diarch_candidate_gain + desc = diarch_succession_score.societal_bonds.your_dynasty + } + } + ## Has same faith + if = { + limit = { faith = liege.faith } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.societal_bonds.your_faith + } + } + ## Is of same culture + if = { + limit = { culture = liege.culture } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.societal_bonds.your_culture + } + } + } + # Royal court. + if = { + limit = { + liege = { has_royal_court = yes } + has_dlc_feature = royal_court + } + add = { + desc = diarch_succession_score.category.royal_court + # ADD SCORE + ## Skill for court type. + ### Diplomacy. + if = { + limit = { + liege = { has_court_type = court_diplomatic } + } + add = { + value = diplomacy + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_court_type_baseline_value + desc = diarch_succession_score.royal_court.court_type.diplomacy + } + } + ### Martial. + if = { + limit = { + liege = { has_court_type = court_warlike } + } + add = { + value = martial + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_court_type_baseline_value + desc = diarch_succession_score.royal_court.court_type.martial + } + } + ### Stewardship. + if = { + limit = { + liege = { has_court_type = court_administrative } + } + add = { + value = stewardship + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_court_type_baseline_value + desc = diarch_succession_score.royal_court.court_type.stewardship + } + } + ### Intrigue. + if = { + limit = { + liege = { has_court_type = court_intrigue } + } + add = { + value = intrigue + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_court_type_baseline_value + desc = diarch_succession_score.royal_court.court_type.intrigue + } + } + ### Learning. + if = { + limit = { + liege = { has_court_type = court_scholarly } + } + add = { + value = learning + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_court_type_baseline_value + desc = diarch_succession_score.royal_court.court_type.learning + } + } + ### Prowess. + if = { + limit = { + liege = { has_court_type = court_tribal } + } + add = { + value = prowess + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_court_type_baseline_value + desc = diarch_succession_score.royal_court.court_type.prowess + } + } + ## Speaks court language. + if = { + limit = { knows_court_language_of = liege } + add = { + value = major_diarch_candidate_gain + desc = diarch_succession_score.royal_court.speaks_court_language + } + } + } + } + # Traits: Noble Ambitions. + add = { + desc = diarch_succession_score.category.traits.noble_ambitions + # ADD SCORE + ## Ambitious trait + if = { + limit = { has_trait = ambitious } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.traits.ambitious + } + } + ## Diligent trait + if = { + limit = { has_trait = diligent } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.traits.diligent + } + } + # REMOVE SCORE + ## Lazy trait + if = { + limit = { has_trait = lazy } + add = { + value = minor_diarch_candidate_loss + desc = diarch_succession_score.traits.lazy + } + } + ## Humble trait + if = { + limit = { has_trait = humble } + add = { + value = minor_diarch_candidate_loss + desc = diarch_succession_score.traits.humble + } + } + ## Content trait + if = { + limit = { has_trait = content } + add = { + value = minor_diarch_candidate_loss + desc = diarch_succession_score.traits.content + } + } + } + # Circumstances. + add = { + desc = diarch_succession_score.category.circumstances + # REMOVE SCORE + ## Has a critical illness + if = { + limit = { has_serious_disease_trigger = yes } + add = { + value = major_diarch_candidate_loss + desc = diarch_succession_score.circumstances.cripplingly_ill + } + } + ## Has severe wounds + if = { + limit = { has_trait = wounded_3 } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.circumstances.badly_wounded + } + } + ## Has a criminal reason. + if = { + limit = { + save_temporary_scope_as = char_temp + liege = { + OR = { + has_imprisonment_reason = scope:char_temp + has_banish_reason = scope:char_temp + has_execute_reason = scope:char_temp + has_revoke_title_reason = scope:char_temp + } + } + } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.circumstances.known_criminal + } + } + ## Under the age of 25 + if = { + limit = { age <= 25 } + add = { + value = minor_diarch_candidate_loss + desc = diarch_succession_score.circumstances.very_young + } + } + ## High-stress characters + if = { + limit = { stress_level >= 1 } + add = { + value = minor_diarch_candidate_loss + desc = diarch_succession_score.circumstances.stressed_out + } + } + ## Bastard / Child of Concubine + if = { + limit = { + OR = { + has_trait = bastard + has_trait = child_of_concubine + } + } + add = { + value = miniscule_diarch_candidate_loss + desc = diarch_succession_score.circumstances.illegitimate + } + } + ## Has a minor illness + if = { + limit = { has_trait = ill } + add = { + value = miniscule_diarch_candidate_loss + desc = diarch_succession_score.circumstances.mildly_ill + } + } + ## Has a minor wound + if = { + limit = { + OR = { + has_trait = wounded_1 + has_trait = wounded_2 + } + } + add = { + value = minor_diarch_candidate_loss + desc = diarch_succession_score.circumstances.mildly_wounded + } + } + ## Doesn't speak your main language + ### Due to technical constraints, we can currently only check if you speak your liege's culture's language, not if you have any shared languages. + if = { + limit = { + NOR = { + knows_language_of_culture = liege.culture + # Exempt family members so that we don't screw wrong-gendered unlanded chars over. + is_close_or_extended_family_of = liege + } + } + add = { + value = major_diarch_candidate_loss + desc = diarch_succession_score.circumstances.not_speak_language + } + } + } + # REMOVE CANDIDATES + ## Must be a vassal or in your court + if = { + limit = { + exists = liege + NOR = { + is_ruler = yes + is_courtier_of = liege + } + } + add = { + value = hard_disable_diarch_candidate_value + desc = diarch_succession_score.disqualifiers.neither_vassal_nor_courtier + } + } + ## Must be an adult + if = { + limit = { is_adult = no } + add = { + value = hard_disable_diarch_candidate_value + desc = diarch_succession_score.disqualifiers.child + } + } + ## Must not NOT imprisoned + if = { + limit = { is_imprisoned = yes } + add = { + value = hard_disable_diarch_candidate_value + desc = diarch_succession_score.disqualifiers.imprisoned + } + } + ## Is NOT incapable or infirm + if = { + limit = { + OR = { + is_incapable = yes + has_trait = infirm + } + } + add = { + value = hard_disable_diarch_candidate_value + desc = diarch_succession_score.disqualifiers.incapable_or_infirm + } + } + ## Event filter. + ### Current regent's shenanigans. + if = { + limit = { var:diarch_succession_filtered_due_to_incumbents_politicking ?= liege } + add = { + value = hard_disable_diarch_candidate_value + desc = diarch_succession_score.disqualifiers.event_filters.incumbent_politicking + } + } + } +} + +diarchy_vizier_succession_score_value = { + if = { + # For performance reasons, you'll sometimes check this when you don't have a liege, so we need to check beforehand for error purposes. + limit = { exists = liege } + # Familial ties. + ## We actually weight down here, as you don't generally want family to be your vizier. + add = { + desc = diarch_succession_score.category.familial_ties + # REMOVE SCORE + ## Is close family + if = { + limit = { is_close_family_of = liege } + add = { + value = monumental_diarch_candidate_loss + desc = diarch_succession_score.familial_ties.undignified.close_family + } + } + ## Is extended family + else_if = { + limit = { is_extended_family_of = liege } + add = { + value = massive_diarch_candidate_loss + desc = diarch_succession_score.familial_ties.undignified.extended_family + } + } + ## Is same-house + else_if = { + limit = { + exists = liege.house + house ?= liege.house + } + add = { + value = major_diarch_candidate_loss + desc = diarch_succession_score.familial_ties.undignified.house + } + } + ## Is same-dynasty + else_if = { + limit = { + exists = liege.dynasty + dynasty = liege.dynasty + } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.familial_ties.undignified.dynasty + } + } + } + # Personal ties. + ## Since viziers aren't generally part of the ruling family, or indeed any ruling family, we cut down personal ties a smidge compared to usual. + add = { + desc = diarch_succession_score.category.personal_ties + # ADD SCORE + ## Is guardian of + if = { + limit = { has_relation_ward = liege } + add = { + value = massive_diarch_candidate_gain + desc = diarch_succession_score.personal_ties.your_ward + } + } + ## Nothing for being on your council - they're a council position, so this'd only ever weight up the incumbent. + ### I mean, technically not _but_ the actual mechanical effect is that the vizier council position'll auto-replace whatever other position they held, which'd get annoying_fast_, so we avoid it. + ## Has positive opinion + if = { + limit = { + opinion = { + target = liege + value >= medium_positive_opinion + } + } + add = { + value = miniscule_diarch_candidate_gain + desc = diarch_succession_score.personal_ties.likes_you + } + } + ## Has positive relationship + if = { + limit = { + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = liege } + } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.personal_ties.your_positive_relation + } + } + # REMOVE SCORE + ## Is your nemesis + if = { + limit = { + has_any_worst_bad_relationship_with_character_trigger = { CHARACTER = liege } + } + add = { + value = major_diarch_candidate_loss + desc = diarch_succession_score.personal_ties.your_nemesis + } + } + ## Has a moderate bad relationship + if = { + limit = { + has_any_only_moderate_bad_relationship_with_character_trigger = { CHARACTER = liege } + } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.personal_ties.your_negative_relation + } + } + ## Has negative opinion + if = { + limit = { + opinion = { + target = liege + value <= medium_negative_opinion + } + } + add = { + value = miniscule_diarch_candidate_loss + desc = diarch_succession_score.personal_ties.dislikes_you + } + } + } + # Suitable servants. + add = { + desc = diarch_succession_score.category.suitable_servant + # ADD SCORE + ## Ruler status. + ### Tax collector. + if = { + limit = { is_tax_collector = yes } + add = { + value = major_diarch_candidate_gain + desc = diarch_succession_score.suitable_servant.tax_collector + } + } + ### Lowborn. + if = { + limit = { is_lowborn = yes } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.suitable_servant.lowborn + } + } + ### Landless. + if = { + limit = { is_landed = no } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.suitable_servant.landless + } + } + ## In-Groupness. + ### Same culture. + if = { + limit = { culture = liege.culture } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.suitable_servant.shares_liege_culture + } + } + ### Same faith. + if = { + limit = { faith = liege.faith } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.suitable_servant.shares_liege_faith + } + } + ### Diff-faith same HoF. + if = { + limit = { + NOT = { faith = liege.faith } + exists = liege.faith.religious_head + faith.religious_head ?= liege.faith.religious_head + } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.suitable_servant.shares_liege_hof + } + } + ### Diff-faith diff-HoF Righteous. + else_if = { + limit = { + NOT = { faith = liege.faith } + faith = { + faith_hostility_level = { + target = prev.liege.faith + value = faith_fully_accepted_level + } + } + } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.suitable_servant.diff_faith_considers_liege_righteous + } + } + ### Diff-faith diff-HoF Astray. + else_if = { + limit = { + NOT = { faith = liege.faith } + faith = { + faith_hostility_level = { + target = prev.liege.faith + value = faith_astray_level + } + } + } + add = { + value = miniscule_diarch_candidate_gain + desc = diarch_succession_score.suitable_servant.diff_faith_considers_liege_astray + } + } + # VARIABLE SCORE + ## In-Groupness. + ### Diff-culture acceptance. + if = { + limit = { + NOT = { culture = liege.culture } + } + culture = { + add = { + value = { + # Grab the our cultural acceptance value. + value = "cultural_acceptance(prev.liege.culture)" + # Now, the actual 0 opinion point is waaaaay up at 100%, so we set a high base to make lacking acceptance more of a problem. + ## But not so high as to screw minorities (who are likely both faith and culture minorities) out of ever getting the position. + add = -50 + # Finally, reduce the number down - this gives us an axis of -10 to +10. + multiply = 0.2 + # Cultural Acceptance actually goes to 2 decimal places, so we need to round it out neatly or someone's gonna end up with a score of 25.03. + round = yes + } + desc = diarch_succession_score.suitable_servant.diff_culture_acceptance + } + } + } + # REMOVE SCORE + ## Ruler status. + ### Punish barons. + #### Double-dipping, but just to make it clear. + if = { + limit = { is_landed = yes } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.suitable_servant.landed + } + } + ## In-Groupness. + ### Diff-faith diff-HoF Hostile. + if = { + limit = { + faith = { + faith_hostility_level = { + target = prev.liege.faith + value = faith_hostile_level + } + } + } + add = { + value = minor_diarch_candidate_loss + desc = diarch_succession_score.suitable_servant.diff_faith_considers_liege_hostile + } + } + ### Diff-faith diff-HoF Evil. + else_if = { + limit = { + faith = { + faith_hostility_level = { + target = prev.liege.faith + value = faith_evil_level + } + } + } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.suitable_servant.diff_faith_considers_liege_evil + } + } + } + # Nepotism. + add = { + desc = diarch_succession_score.category.nepotism + # Liege Partners. + ## Friends with primary spouse. + if = { + limit = { + liege.primary_spouse ?= { has_relation_friend = prev } + } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.nepotism.primary_spouse.friend + } + } + ## Friends with consort + if = { + limit = { + diarch_candidate_shares_relationship_with_lesser_consort_trigger = { RELATION = friend } + } + add = { + value = minor_diarch_candidate_gain + desc = diarch_succession_score.nepotism.consort.friend + } + } + ## Best Friends with primary spouse. + if = { + limit = { + liege.primary_spouse ?= { has_relation_best_friend = prev } + } + add = { + value = major_diarch_candidate_gain + desc = diarch_succession_score.nepotism.primary_spouse.best_friend + } + } + ## Best Friends with consort + if = { + limit = { + diarch_candidate_shares_relationship_with_lesser_consort_trigger = { RELATION = best_friend } + } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.nepotism.consort.best_friend + } + } + ## Rivals with primary spouse. + if = { + limit = { + liege.primary_spouse ?= { has_relation_rival = prev } + } + add = { + value = major_diarch_candidate_loss + desc = diarch_succession_score.nepotism.primary_spouse.rival + } + } + ## Rivals with consort + if = { + limit = { + diarch_candidate_shares_relationship_with_lesser_consort_trigger = { RELATION = rival } + } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.nepotism.consort.rival + } + } + ## Nemeses with primary spouse. + if = { + limit = { + liege.primary_spouse ?= { has_relation_nemesis = prev } + } + add = { + value = monumental_diarch_candidate_loss + desc = diarch_succession_score.nepotism.primary_spouse.nemesis + } + } + ## Nemeses with consort + if = { + limit = { + diarch_candidate_shares_relationship_with_lesser_consort_trigger = { RELATION = nemesis } + } + add = { + value = massive_diarch_candidate_loss + desc = diarch_succession_score.nepotism.consort.nemesis + } + } + ## Shares culture with minority consort + if = { + limit = { + diarch_candidate_shares_minority_status_with_trigger = { + TRIGGER_OR_TARGET = any_consort + QUALITY = culture + } + } + add = { + value = major_diarch_candidate_gain + desc = diarch_succession_score.nepotism.any_consort.shares_minority_culture + } + } + ## Shares faith with minority consort + if = { + limit = { + diarch_candidate_shares_minority_status_with_trigger = { + TRIGGER_OR_TARGET = any_consort + QUALITY = faith + } + } + add = { + value = major_diarch_candidate_gain + desc = diarch_succession_score.nepotism.any_consort.shares_minority_faith + } + } + # Liege Stay-at-Home Children. + ## Friends with SaH child. + if = { + limit = { + diarch_candidate_shares_relationship_with_child_trigger = { RELATION = friend } + } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.nepotism.sah_child.friend + } + } + ## Best Friends with SaH child. + if = { + limit = { + diarch_candidate_shares_relationship_with_child_trigger = { RELATION = best_friend } + } + add = { + value = major_diarch_candidate_gain + desc = diarch_succession_score.nepotism.sah_child.best_friend + } + } + ## Rivals with SaH child. + if = { + limit = { + diarch_candidate_shares_relationship_with_child_trigger = { RELATION = rival } + } + add = { + value = major_diarch_candidate_loss + desc = diarch_succession_score.nepotism.sah_child.rival + } + } + ## Nemeses with SaH child. + if = { + limit = { + diarch_candidate_shares_relationship_with_child_trigger = { RELATION = nemesis } + } + add = { + value = massive_diarch_candidate_loss + desc = diarch_succession_score.nepotism.sah_child.nemesis + } + } + ## Shares culture with minority SaH child. + if = { + limit = { + diarch_candidate_shares_minority_status_with_trigger = { + TRIGGER_OR_TARGET = any_child + QUALITY = culture + } + } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.nepotism.sah_child.shares_minority_culture + } + } + ## Shares faith with minority SaH child. + if = { + limit = { + diarch_candidate_shares_minority_status_with_trigger = { + TRIGGER_OR_TARGET = any_child + QUALITY = faith + } + } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.nepotism.sah_child.shares_minority_faith + } + } + # Incumbent Vizier. + if = { + limit = { exists = liege.diarch } + # Close family of incumbent vizier. + if = { + limit = { + NOT = { this = liege.diarch } + is_close_family_of = liege.diarch + } + add = { + value = massive_diarch_candidate_gain + desc = diarch_succession_score.nepotism.incumbent_vizier.close_family + } + } + # Extended family of incumbent vizier. + if = { + limit = { + NOT = { this = liege.diarch } + is_extended_family_of = liege.diarch + } + add = { + value = major_diarch_candidate_gain + desc = diarch_succession_score.nepotism.incumbent_vizier.extended_family + } + } + # Friends with incumbent vizier. + if = { + limit = { has_relation_friend = liege.diarch } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.nepotism.incumbent_vizier.friend + } + } + # Best Friends with incumbent vizier. + if = { + limit = { has_relation_best_friend = liege.diarch } + add = { + value = massive_diarch_candidate_gain + desc = diarch_succession_score.nepotism.incumbent_vizier.best_friend + } + } + # Rivals with incumbent vizier. + if = { + limit = { has_relation_rival = liege.diarch } + add = { + value = major_diarch_candidate_loss + desc = diarch_succession_score.nepotism.incumbent_vizier.rival + } + } + # Nemeses with incumbent vizier. + if = { + limit = { has_relation_nemesis = liege.diarch } + add = { + value = monumental_diarch_candidate_loss + desc = diarch_succession_score.nepotism.incumbent_vizier.nemesis + } + } + # Shares culture with minority incumbent vizier. + if = { + limit = { + NOT = { this = liege.diarch } + diarch_candidate_shares_minority_status_with_trigger = { + TRIGGER_OR_TARGET = diarch + QUALITY = culture + } + } + add = { + value = major_diarch_candidate_gain + desc = diarch_succession_score.nepotism.incumbent_vizier.shares_minority_culture + } + } + # Shares faith with minority incumbent vizier. + if = { + limit = { + NOT = { this = liege.diarch } + diarch_candidate_shares_minority_status_with_trigger = { + TRIGGER_OR_TARGET = diarch + QUALITY = faith + } + } + add = { + value = major_diarch_candidate_gain + desc = diarch_succession_score.nepotism.incumbent_vizier.shares_minority_faith + } + } + } + } + # Royal court. + if = { + limit = { + liege = { has_royal_court = yes } + has_dlc_feature = royal_court + } + add = { + desc = diarch_succession_score.category.royal_court + # ADD SCORE + ## Skill for court type. + ### Diplomacy. + if = { + limit = { + liege = { has_court_type = court_diplomatic } + } + add = { + value = diplomacy + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_court_type_baseline_value + desc = diarch_succession_score.royal_court.court_type.diplomacy + } + } + ### Martial. + if = { + limit = { + liege = { has_court_type = court_warlike } + } + add = { + value = martial + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_court_type_baseline_value + desc = diarch_succession_score.royal_court.court_type.martial + } + } + ### Stewardship. + if = { + limit = { + liege = { has_court_type = court_administrative } + } + add = { + value = stewardship + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_court_type_baseline_value + desc = diarch_succession_score.royal_court.court_type.stewardship + } + } + ### Intrigue. + if = { + limit = { + liege = { has_court_type = court_intrigue } + } + add = { + value = intrigue + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_court_type_baseline_value + desc = diarch_succession_score.royal_court.court_type.intrigue + } + } + ### Learning. + if = { + limit = { + liege = { has_court_type = court_scholarly } + } + add = { + value = learning + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_court_type_baseline_value + desc = diarch_succession_score.royal_court.court_type.learning + } + } + ### Prowess. + if = { + limit = { + liege = { has_court_type = court_tribal } + } + add = { + value = prowess + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_court_type_baseline_value + desc = diarch_succession_score.royal_court.court_type.prowess + } + } + ## Speaks court language. + if = { + limit = { knows_court_language_of = liege } + add = { + # Value a bit lower than elsewhere; it's not that it's not important, but it's more easily out-balanced by other factors (e.g., competency) so we need to lower it proportionally. + value = medium_diarch_candidate_gain + desc = diarch_succession_score.royal_court.speaks_court_language + } + } + } + } + # Base skills. + ## Viziers are a very functional job, so they always take account of the most practical courtly skills. + add = { + desc = diarch_succession_score.category.competence + # ADD SCORE + ## Diplomacy. + add = { + value = diplomacy + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_competence_baseline_value + desc = diarch_succession_score.competence.vizierate.diplomacy + } + ## Stewardship. + add = { + value = stewardship + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_competence_baseline_value + desc = diarch_succession_score.competence.vizierate.stewardship + } + ## Intrigue. + add = { + value = intrigue + # Then we subtract the baseline so that your skill has to matter. + subtract = diarchy_succession_competence_baseline_value + desc = diarch_succession_score.competence.vizierate.intrigue + } + } + # Traits: Civil Service. + ## These are a bit more important due to the lack of familial ties, so we boost the score a little. + add = { + desc = diarch_succession_score.category.traits.civil_service + # ADD SCORE + ## Prefer motivated workers. + ### Ambitious trait + if = { + limit = { has_trait = ambitious } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.traits.ambitious + } + } + ### Diligent trait + if = { + limit = { has_trait = diligent } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.traits.diligent + } + } + ## But also just things that make you a good civil servant. + ### Humble trait + if = { + limit = { has_trait = humble } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.traits.humble + } + } + ### Content trait + if = { + limit = { has_trait = content } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.traits.content + } + } + ### Patient trait + if = { + limit = { has_trait = patient } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.traits.patient + } + } + ### Just trait + if = { + limit = { has_trait = just } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.traits.just + } + } + ## Both extremities of the wealth spectrum are appreciated. + ### Greedy + if = { + limit = { has_trait = greedy } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.traits.greedy + } + } + ### Generous + if = { + limit = { has_trait = generous } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.traits.generous + } + } + ## Plus some lifestyle cappers. + ### Diplomat + if = { + limit = { has_trait = diplomat } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.traits.diplomat + } + } + ### Administrator + if = { + limit = { has_trait = administrator } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.traits.administrator + } + } + ### Avaricious + if = { + limit = { has_trait = avaricious } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.traits.avaricious + } + } + ### Schemer + if = { + limit = { has_trait = schemer } + add = { + value = medium_diarch_candidate_gain + desc = diarch_succession_score.traits.schemer + } + } + # REMOVE SCORE + ## Poor workers. + ### Lazy trait + if = { + limit = { has_trait = lazy } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.traits.lazy + } + } + ### Arrogant trait + if = { + limit = { has_trait = arrogant } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.traits.arrogant + } + } + ### Impatient trait + if = { + limit = { has_trait = impatient } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.traits.impatient + } + } + } + # Circumstances. + add = { + desc = diarch_succession_score.category.circumstances + # REMOVE SCORE + ## Has a critical illness + if = { + limit = { has_serious_disease_trigger = yes } + add = { + value = major_diarch_candidate_loss + desc = diarch_succession_score.circumstances.cripplingly_ill + } + } + ## Has severe wounds + if = { + limit = { has_trait = wounded_3 } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.circumstances.badly_wounded + } + } + ## Has a criminal reason. + if = { + limit = { + save_temporary_scope_as = char_temp + liege = { + OR = { + has_imprisonment_reason = scope:char_temp + has_banish_reason = scope:char_temp + has_execute_reason = scope:char_temp + has_revoke_title_reason = scope:char_temp + } + } + } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.circumstances.known_criminal + } + } + ## Under the age of 25 + if = { + limit = { age <= 25 } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.circumstances.very_young + } + } + ## High-stress characters + if = { + limit = { stress_level >= 1 } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.circumstances.stressed_out + } + } + ## Has a minor illness + if = { + limit = { has_trait = ill } + add = { + value = minor_diarch_candidate_loss + desc = diarch_succession_score.circumstances.mildly_ill + } + } + ## Has a minor wound + if = { + limit = { + OR = { + has_trait = wounded_1 + has_trait = wounded_2 + } + } + add = { + value = medium_diarch_candidate_loss + desc = diarch_succession_score.circumstances.mildly_wounded + } + } + ## Doesn't speak your main language + ### Due to technical constraints, we can currently only check if you speak your liege's culture's language, not if you have any shared languages. + if = { + limit = { + NOR = { + knows_language_of_culture = liege.culture + # Exempt family members so that we don't screw wrong-gendered unlanded chars over. + is_close_or_extended_family_of = liege + } + } + add = { + value = major_diarch_candidate_loss + desc = diarch_succession_score.circumstances.not_speak_language + } + } + } + # REMOVE CANDIDATES + ## Cannot be a big land owner + if = { + limit = { highest_held_title_tier > tier_barony } + add = { + value = hard_disable_diarch_candidate_value + desc = diarch_succession_score.disqualifiers.count_or_above + } + } + ## Must be an adult + if = { + limit = { is_adult = no } + add = { + value = hard_disable_diarch_candidate_value + desc = diarch_succession_score.disqualifiers.child + } + } + ## Must not NOT imprisoned + if = { + limit = { is_imprisoned = yes } + add = { + value = hard_disable_diarch_candidate_value + desc = diarch_succession_score.disqualifiers.imprisoned + } + } + ## Is NOT incapable or infirm + if = { + limit = { + OR = { + is_incapable = yes + has_trait = infirm + } + } + add = { + value = hard_disable_diarch_candidate_value + desc = diarch_succession_score.disqualifiers.incapable_or_infirm + } + } + ## MUST match liege's faith gender requirements + ### We double-check this here (even though it's disallowed for validity) to stop wrong-gendered characters sneakily inheriting the post when the numbers haven't been recalc'd then _immediately_ invalidating. + if = { + limit = { diarch_matches_liege_faith_gender_preference_trigger = no } + add = { + value = hard_disable_diarch_candidate_value + desc = diarch_succession_score.disqualifiers.right_gendered_for_liege + } + } + ## Event filter. + ### Current regent's shenanigans. + if = { + limit = { var:diarch_succession_filtered_due_to_incumbents_politicking ?= liege } + add = { + value = hard_disable_diarch_candidate_value + desc = diarch_succession_score.disqualifiers.event_filters.incumbent_politicking + } + } + } +} + +courtly_offence_at_succession_threshold_low = 15 +courtly_offence_at_succession_threshold_medium = 30 +courtly_offence_at_succession_threshold_high = 45 + +courtly_offence_scandalise_value = -60 +courtly_offence_greatly_offend_value = -50 +courtly_offence_offend_value = -40 +courtly_offence_somewhat_offend_value = -20 +courtly_offence_lightly_offend_value = -10 + +################################################## +# Character Interactions + +diarch_ai_desire_plus_3_value = 50 +diarch_ai_desire_plus_2_value = 30 +diarch_ai_desire_plus_1_value = 10 +diarch_ai_desire_minus_1_value = -10 +diarch_ai_desire_minus_2_value = -30 +diarch_ai_desire_minus_3_value = -50 + +liege_trust_diarch_trilateral_interaction_default_value = { + # Base for players. + value = 25 + # But if we've got AI on either side of us, who're nicely weighted to be considerate to their liege, be a little more trusting. + if = { + limit = { + scope:actor = { is_ai = yes } + scope:recipient = { is_ai = yes } + } + add = 75 + } +} + +liege_diarchy_veto_prestige_cost_high = -250 +liege_diarchy_veto_prestige_cost_medium = -150 +liege_diarchy_veto_prestige_cost_low = -75 + +liege_diarchy_veto_influence_cost_high = -150 +liege_diarchy_veto_influence_cost_medium = -100 +liege_diarchy_veto_influence_cost_low = -50 + +# Overall control values for keeping some vague level of parity between prestige surcharges for lieges in powerful diarchies. +liege_diarchy_surcharge_interaction_miniscule_value = minor_prestige_value +liege_diarchy_surcharge_interaction_minor_value = medium_prestige_value +liege_diarchy_surcharge_interaction_medium_value = 250 +liege_diarchy_surcharge_interaction_major_value = major_prestige_value +liege_diarchy_surcharge_interaction_massive_value = 450 + +liege_diarchy_surcharge_interaction_revoke_title_interaction_value = { + # Base value of zero, since this is free by default. + value = { + value = 0 + desc = BASE + } + + # But, inside diarchies, there's a cost attached to various simple political actions. + scope:actor = { + if = { + limit = { has_active_diarchy = yes } + # Mild costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_mild } + add = { + value = liege_diarchy_surcharge_interaction_miniscule_value + desc = IS_IN_DIARCHY_MILD_COSTS + } + } + # Medium costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_medium } + add = { + value = liege_diarchy_surcharge_interaction_minor_value + desc = IS_IN_DIARCHY_MEDIUM_COSTS + } + } + # Major costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_major } + add = { + value = liege_diarchy_surcharge_interaction_medium_value + desc = IS_IN_DIARCHY_MAJOR_COSTS + } + } + # Massive costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_massive } + add = { + value = liege_diarchy_surcharge_interaction_massive_value + desc = IS_IN_DIARCHY_MASSIVE_COSTS + } + } + } + } +} + +liege_diarchy_surcharge_interaction_retract_vassal_interaction_value = { + # Base value of zero, since this is free by default. + value = { + value = 0 + desc = BASE + } + + # But, inside diarchies, there's a cost attached to various simple political actions. + scope:actor = { + if = { + limit = { has_active_diarchy = yes } + # Mild costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_mild } + add = { + value = liege_diarchy_surcharge_interaction_miniscule_value + desc = IS_IN_DIARCHY_MILD_COSTS + } + } + # Medium costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_medium } + add = { + value = liege_diarchy_surcharge_interaction_minor_value + desc = IS_IN_DIARCHY_MEDIUM_COSTS + } + } + # Major costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_major } + add = { + value = liege_diarchy_surcharge_interaction_medium_value + desc = IS_IN_DIARCHY_MAJOR_COSTS + } + } + # Massive costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_massive } + add = { + value = liege_diarchy_surcharge_interaction_major_value + desc = IS_IN_DIARCHY_MASSIVE_COSTS + } + } + } + } +} + +liege_diarchy_surcharge_interaction_imprison_interaction_value = { + # Base value of zero, since this is free by default. + value = { + value = 0 + desc = BASE + } + + # But, inside diarchies, there's a cost attached to various simple political actions. + scope:actor = { + if = { + limit = { has_active_diarchy = yes } + # Mild costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_mild } + add = { + value = liege_diarchy_surcharge_interaction_miniscule_value + desc = IS_IN_DIARCHY_MILD_COSTS + } + } + # Medium costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_medium } + add = { + value = liege_diarchy_surcharge_interaction_minor_value + desc = IS_IN_DIARCHY_MEDIUM_COSTS + } + } + # Major costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_major } + add = { + value = liege_diarchy_surcharge_interaction_medium_value + desc = IS_IN_DIARCHY_MAJOR_COSTS + } + } + # Massive costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_massive } + add = { + value = liege_diarchy_surcharge_interaction_major_value + desc = IS_IN_DIARCHY_MASSIVE_COSTS + } + } + } + } +} + +liege_diarchy_surcharge_interaction_execute_prisoner_interaction_value = { + # Base value of zero, since this is free by default. + value = { + value = 0 + desc = BASE + } + + # But, inside diarchies, there's a cost attached to various simple political actions. + scope:actor = { + if = { + limit = { has_active_diarchy = yes } + # Mild costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_mild } + add = { + value = liege_diarchy_surcharge_interaction_miniscule_value + desc = IS_IN_DIARCHY_MILD_COSTS + } + } + # Medium costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_medium } + add = { + value = liege_diarchy_surcharge_interaction_minor_value + desc = IS_IN_DIARCHY_MEDIUM_COSTS + } + } + # Major costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_major } + add = { + value = liege_diarchy_surcharge_interaction_medium_value + desc = IS_IN_DIARCHY_MAJOR_COSTS + } + } + # Massive costs. + if = { + limit = { has_diarchy_active_parameter = liege_pays_currency_surcharge_for_mundane_interactions_massive } + add = { + value = liege_diarchy_surcharge_interaction_major_value + desc = IS_IN_DIARCHY_MASSIVE_COSTS + } + } + } + } + + # If our faith believes in HumSac, then this is a religious action and never costs prestige. + if = { + limit = { + scope:actor.faith = { has_doctrine_parameter = human_sacrifice_active } + } + multiply = 0 + } +} + +subsidised_liege_authority_discount_value = 0.5 +lowered_liege_authority_discount_value = 0.25 + +legal_meddling_interaction_title_cost_value = { + value = 0 + + # Boost the value for duchies. + if = { + limit = { + exists = scope:target + scope:target.tier = tier_duchy + } + add = major_prestige_loss + } + # Even more for kingdoms. + else_if = { + limit = { + exists = scope:target + scope:target.tier = tier_kingdom + } + add = massive_prestige_loss + } + # Or else default back to counties. + else = { add = medium_prestige_loss } +} + +legal_meddling_interaction_title_discounted_cost_value = { + value = legal_meddling_interaction_title_cost_value + multiply = 0.5 + # Now make it neat. + divide = 10 + round = yes + multiply = 10 +} + +syphon_treasury_duel_target_value = { + # We generally want to duel vs. the liege's stewardship... + value = liege.stewardship + # ... but in the interests of fairness, we put a floor on it. + min = low_skill_rating +} + +syphon_treasury_stewardship_very_high = very_high_skill_rating +syphon_treasury_stewardship_high = decent_skill_rating +syphon_treasury_stewardship_medium = mediocre_skill_rating + +syphon_treasury_gold_gain_low = { + value = 0 + add = scope:recipient.minor_gold_value +} +syphon_treasury_gold_gain_medium = { + value = 0 + add = scope:recipient.medium_gold_value +} +syphon_treasury_gold_gain_high = { + value = 0 + add = scope:recipient.major_gold_value +} +syphon_treasury_gold_gain_very_high = { + value = 0 + add = scope:recipient.monumental_gold_value +} + +syphon_treasury_recipient_county_tally = { + value = 0 + # This gets used in a trigger and was being fussy about having effects in it, so we do it the manual way. Le sigh. + scope:recipient = { + # If scope:recipient has at least five counties, we add 5. + if = { + limit = { + any_held_county = { count >= 5 } + } + add = 5 + } + # Else 4. + else_if = { + limit = { + any_held_county = { count >= 4 } + } + add = 4 + } + # Else 3. + else_if = { + limit = { + any_held_county = { count >= 3 } + } + add = 3 + } + # Else 2. + else_if = { + limit = { + any_held_county = { count >= 2 } + } + add = 2 + } + # Else 1. + else = { add = 1 } + } +} + +syphon_treasury_county_attribute_loss_fraction = { + value = scope:county_attribute_loss + scope:recipient = { + # If scope:recipient has at least five counties, we divide by 5. + if = { + limit = { + any_held_county = { count >= 5 } + } + multiply = 0.2 + } + # Else 4. + else_if = { + limit = { + any_held_county = { count >= 4 } + } + multiply = 0.25 + } + # Else 3. + else_if = { + limit = { + any_held_county = { count >= 3 } + } + multiply = 0.33 + } + # Else 2. + else_if = { + limit = { + any_held_county = { count >= 2 } + } + multiply = 0.5 + } + # Else 1, so we do nothing. + } +} + +shift_privileges_interaction_target_cost_value = { + value = 0 + + # It's cheaper to attack higher tiers than lower ones. + ## So kingdoms are cheapest. + if = { + limit = { scope:recipient.highest_held_title_tier = tier_kingdom } + add = medium_prestige_loss + } + ## Then duchies. + else_if = { + limit = { scope:recipient.highest_held_title_tier = tier_duchy } + add = major_prestige_loss + } + ## And otherwise we default back to the humble county. + else = { add = massive_prestige_loss } +} + +shift_privileges_interaction_target_discounted_cost_value = { + value = shift_privileges_interaction_target_cost_value + multiply = 0.5 + # Now make it neat. + divide = 10 + round = yes + multiply = 10 +} + +shift_privileges_modifier_duration_value = 8 + +swing_scales_discounts_multiplier_value = { + # Landless characters pay a fraction. + if = { + limit = { is_playable_character = no } + value = 0.75 + } + # Otherwise we give the AI mate's rates to encourage them to use the system. + else_if = { + limit = { is_ai = yes } + value = 0.5 + } + # Otherwise no discounts. + else = { value = 1 } +} + +swing_scales_influence_cost_value = { + value = 0 + # Gate by liege tier. + ## Count. + if = { + limit = { liege.highest_held_title_tier <= tier_county } + add = minor_influence_value + } + ## Duke. + else_if = { + limit = { liege.highest_held_title_tier <= tier_duchy } + add = medium_influence_value + } + ## King or Emperor + else = { add = major_influence_value } + + # Adjust how much this swing costs due to Legitimacy + ## Should only affect the regent, not the ruler + if = { + limit = { + scope:recipient = { is_liege_or_above_of = scope:actor } + } + # 1 + if = { + limit = { liege.legitimacy_level = 1 } + add = miniscule_influence_value + } + # 2 + else_if = { + limit = { liege.legitimacy_level = 2 } + add = minor_influence_value + } + # 3 + else_if = { + limit = { liege.legitimacy_level = 3 } + add = medium_influence_value + } + # 4 + else_if = { + limit = { liege.legitimacy_level = 4 } + add = major_influence_value + } + # 5 + else_if = { + limit = { liege.legitimacy_level = 5 } + add = massive_influence_value + } + else = { + # Deliberately empty + # Adjustable in the future if necessary + } + } +} + +swing_scales_prestige_cost_value = { + value = 0 + # Gate by liege tier. + ## Count. + if = { + limit = { liege.highest_held_title_tier <= tier_county } + add = minor_prestige_value + } + ## Duke. + else_if = { + limit = { liege.highest_held_title_tier <= tier_duchy } + add = medium_prestige_value + } + ## King or Emperor + else = { add = major_prestige_value } + + # Adjust how much this swing costs due to Legitimacy + ## Should only affect the regent, not the ruler + if = { + limit = { + scope:recipient = { is_liege_or_above_of = scope:actor } + } + # 1 + if = { + limit = { liege.legitimacy_level = 1 } + add = miniscule_prestige_value + } + # 2 + else_if = { + limit = { liege.legitimacy_level = 2 } + add = minor_prestige_value + } + # 3 + else_if = { + limit = { liege.legitimacy_level = 3 } + add = medium_prestige_value + } + # 4 + else_if = { + limit = { liege.legitimacy_level = 4 } + add = major_prestige_value + } + # 5 + else_if = { + limit = { liege.legitimacy_level = 5 } + add = massive_prestige_value + } + else = { + # Deliberately empty + # Adjustable in the future if necessary + } + } +} + +swing_scales_piety_cost_value = { + # Various ways to be charged piety. + ## Pure route. + if = { + limit = { + OR = { + always = scope:swing_piety + # And if we're in the important_action... + NOT = { exists = scope:swing_piety } + } + } + value = 0 + # Gate by liege tier. + ## Count. + if = { + limit = { liege.highest_held_title_tier <= tier_county } + add = minor_piety_value + } + ## Duke. + else_if = { + limit = { liege.highest_held_title_tier <= tier_duchy } + add = medium_piety_value + } + ## King or Emperor + else = { add = major_piety_value } + } + ## Hybrid HoF route. + else_if = { + limit = { always = scope:swing_hof } + value = 0 + # Gate by liege tier. + ## Count. + if = { + limit = { liege.highest_held_title_tier <= tier_county } + add = minor_piety_value + } + ## Duke. + else_if = { + limit = { liege.highest_held_title_tier <= tier_duchy } + add = medium_piety_value + } + ## King or Emperor + else = { add = major_piety_value } + } + + # Adjust how much this swing costs due to Legitimacy + ## Should only affect the regent, not the ruler + if = { + limit = { + scope:recipient = { is_liege_or_above_of = scope:actor } + } + # 1 + if = { + limit = { liege.legitimacy_level = 1 } + add = miniscule_piety_value + } + # 2 + else_if = { + limit = { liege.legitimacy_level = 2 } + add = minor_piety_value + } + # 3 + else_if = { + limit = { liege.legitimacy_level = 3 } + add = medium_piety_value + } + # 4 + else_if = { + limit = { liege.legitimacy_level = 4 } + add = major_piety_value + } + # 5 + else_if = { + limit = { liege.legitimacy_level = 5 } + add = massive_piety_value + } + else = { + # Deliberately empty + # Adjustable in the future if necessary + } + } +} + +swing_scales_cash_cost_value = { + ## Pure route. + if = { + limit = { + OR = { + always = scope:swing_gold + # And if we're in the important action... + NOT = { exists = scope:swing_gold } + } + } + value = 0 + # Gate by liege tier. + ## Count. + if = { + limit = { liege.highest_held_title_tier <= tier_county } + add = medium_gold_value + } + ## Duke. + else_if = { + limit = { liege.highest_held_title_tier <= tier_duchy } + add = major_gold_value + } + ## King or Emperor + else = { add = massive_gold_value } + } + ## Hybrid HoF route. + else_if = { + limit = { always = scope:swing_hof } + value = 0 + # Gate by liege tier. + ## Count. + if = { + limit = { liege.highest_held_title_tier <= tier_county } + add = minor_gold_value + } + ## Duke. + else_if = { + limit = { liege.highest_held_title_tier <= tier_duchy } + add = medium_gold_value + } + ## King or Emperor + else = { add = major_gold_value } + } + + # Adjust how much this swing costs due to Legitimacy + ## Should only affect the regent, not the ruler + if = { + limit = { + scope:recipient = { is_liege_or_above_of = scope:actor } + } + # 1 + if = { + limit = { liege.legitimacy_level = 1 } + add = tiny_gold_value + } + # 2 + else_if = { + limit = { liege.legitimacy_level = 2 } + add = minor_gold_value + } + # 3 + else_if = { + limit = { liege.legitimacy_level = 3 } + add = medium_gold_value + } + # 4 + else_if = { + limit = { liege.legitimacy_level = 4 } + add = major_gold_value + } + # 5 + else_if = { + limit = { liege.legitimacy_level = 5 } + add = massive_gold_value + } + else = { + # Deliberately empty + # Adjustable in the future if necessary + } + } +} + +swing_scales_hof_actor_opinion_min_value = high_positive_opinion + +swing_scales_hof_recipient_opinion_max_value = medium_positive_opinion + +liege_dismiss_temporary_regency_interaction_dynasty_prestige_value = { value = medium_dynasty_prestige_gain } + +liege_dismiss_entrenched_regency_interaction_dynasty_prestige_value = { value = major_dynasty_prestige_gain } + +diarch_should_educate_liege_value = 50 + +vizier_bonus_tax_jurisdictions_value = { + add = stewardship + divide = 7.5 + min = 1 + max = 5 +} + +vizier_dismissal_penalty_sop_mult_value = 0.1 + +vizier_extravagance_modifiers_t1_tally = { + if = { + limit = { has_character_modifier = vizier_extravagance_t1_treasure_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = vizier_extravagance_t1_activities_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = vizier_extravagance_t1_property_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = vizier_extravagance_t1_charity_modifier } + add = 1 + } +} + +vizier_extravagance_modifiers_t2_tally = { + if = { + limit = { has_character_modifier = vizier_extravagance_t2_treasure_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = vizier_extravagance_t2_activities_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = vizier_extravagance_t2_property_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = vizier_extravagance_t2_charity_modifier } + add = 1 + } +} + +vizier_extravagance_modifiers_t3_tally = { + if = { + limit = { has_character_modifier = vizier_extravagance_t3_treasure_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = vizier_extravagance_t3_activities_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = vizier_extravagance_t3_property_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = vizier_extravagance_t3_charity_modifier } + add = 1 + } +} + +vizier_extravagance_modifiers_t4_tally = { + if = { + limit = { has_character_modifier = vizier_extravagance_t4_treasure_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = vizier_extravagance_t4_activities_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = vizier_extravagance_t4_property_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = vizier_extravagance_t4_charity_modifier } + add = 1 + } +} + +vizier_mulct_swing_check_value = { + value = 100 + subtract = diarchy_swing +} +vizier_mulct_swing_gain_miniscule_value = miniscule_sop_swing_diarch_gain +vizier_mulct_swing_gain_minor_value = minor_sop_swing_diarch_gain +vizier_mulct_swing_gain_medium_value = medium_sop_swing_diarch_gain +vizier_mulct_swing_gain_major_value = major_sop_swing_diarch_gain +vizier_mulct_swing_gain_massive_value = massive_sop_swing_diarch_gain + +request_imperial_expedition_influence_stake_minor_value = 100 +request_imperial_expedition_influence_stake_medium_value = 200 +request_imperial_expedition_influence_stake_major_value = 300 + +request_imperial_expedition_minimum_troop_count_value = 1000 + +request_imperial_expedition_influence_from_counties_full_value = { + value = medium_influence_value + multiply = var:title_tally_all +} +request_imperial_expedition_influence_from_vassals_full_value = { + value = medium_influence_value + multiply = var:vassal_tally_all +} + +request_imperial_expedition_influence_from_counties_prize_value = { + value = medium_influence_value + multiply = var:vassal_tally_prize +} +request_imperial_expedition_influence_from_vassals_prize_value = { + value = medium_influence_value + multiply = var:title_tally_prize +} + +request_imperial_expedition_influence_from_counties_reduced_value = { + value = minor_influence_value + multiply = var:title_tally_all +} +request_imperial_expedition_influence_from_vassals_reduced_value = { + value = medium_influence_value + multiply = var:vassal_tally_all +} + +diarch_demand_despotate_interaction_stake_major_value = 500 +diarch_demand_despotate_interaction_stake_medium_value = 350 +diarch_demand_despotate_interaction_stake_minor_value = 200 +diarch_demand_despotate_interaction_stake_to_raise_major_value = { + value = diarch_demand_despotate_interaction_stake_major_value + multiply = -2 +} +diarch_demand_despotate_interaction_stake_to_raise_medium_value = { + value = diarch_demand_despotate_interaction_stake_medium_value + multiply = -2 +} +diarch_demand_despotate_interaction_stake_to_raise_minor_value = { + value = diarch_demand_despotate_interaction_stake_minor_value + multiply = -2 +} +# Invert these _again_ for use in loc/some triggers. +## No I am not okay, thank you for asking. +diarch_demand_despotate_interaction_stake_to_raise_major_inverted_value = { + value = diarch_demand_despotate_interaction_stake_to_raise_major_value + multiply = -1 +} +diarch_demand_despotate_interaction_stake_to_raise_medium_inverted_value = { + value = diarch_demand_despotate_interaction_stake_to_raise_medium_value + multiply = -1 +} +diarch_demand_despotate_interaction_stake_to_raise_minor_inverted_value = { + value = diarch_demand_despotate_interaction_stake_to_raise_minor_value + multiply = -1 +} + +scapegoat_counterpart_interaction_calc_diplo_diff_treshhold_value = { + add = scope:actor.diplomacy + subtract = scope:recipient.diplomacy +} +scapegoat_counterpart_interaction_calc_intrigue_diff_treshhold_value = { + add = scope:actor.intrigue + subtract = scope:recipient.intrigue +} + +diarch_regent_appoints_self_co_emperor_interaction_sop_swing_set_value = 40 + +diarch_authority_ceded_opinion_value = 20 + +################################################## +# Activities + +diarch_reduced_strife_for_inviting_powerful_covassals_value = { + value = 0 + every_attending_character = { + limit = { + NOT = { this = scope:host } + is_powerful_vassal_of = scope:host.liege + } + add = -4 + } +} + +################################################## +# Mandate Events + +diarchy_1731_minimum_county_opinion_value = high_negative_opinion + +################################################## +# Decisions + +pv_overthrow_threshold_value = { + value = 0 + # Grab our sum total of powerful vassals. + liege = { + every_powerful_vassal = { add = 1 } + } + # Halve it. + multiply = 0.5 + # Now round down to even us out. + floor = yes + # And add +1 to get a simple majority. + add = 1 + # ... but then subtract one if we're a powerful vassal, since we _won't_ be in the list but, naturally, support the coup. + if = { + limit = { is_powerful_vassal = yes } + add = -1 + } +} + +pv_overthrow_tally_value = { + value = 0 + every_in_list = { + variable = coup_pv_supporters_list + limit = { + is_powerful_vassal_of = root.liege + is_alive = yes + } + add = 1 + } +} + +# Display versions of the values: these are one higher to adjust for root potentially being in them. +pv_overthrow_threshold_display_value = { + value = pv_overthrow_threshold_value + # ... but then add back the one if we're a powerful vassal, since we _won't_ be in the list but, naturally, support the coup. + if = { + limit = { is_powerful_vassal = yes } + add = 1 + } +} + +pv_overthrow_tally_display_value = { + value = pv_overthrow_tally_value + # ... and remember to add one if we're a powerful vassal, since we _won't_ be in the list but, naturally, support the coup. + ## We have to separate out the values like this, since the actual list checks powerful vassals and we're not actually in it. + if = { + limit = { is_powerful_vassal = yes } + add = 1 + } +} + +################################################## +# Parameters + +# We scale the benefits to both parties in a co-emperorship or junior emperorship by how many years they've been in the job, controlled by this. +co_emperor_scale_years_in_job_value = 5 + +# Controls how much skill gain child diarchs get on transitioning to majority +## T1 +diarch_gain_skill_on_majority_t1_primary_value = 2 +diarch_gain_skill_on_majority_t1_secondary_value = 1 +## T2 +diarch_gain_skill_on_majority_t2_primary_value = 3 +diarch_gain_skill_on_majority_t2_primary_diff_value = { + value = diarch_gain_skill_on_majority_t2_primary_value + subtract = diarch_gain_skill_on_majority_t1_primary_value +} +diarch_gain_skill_on_majority_t2_secondary_value = 2 +diarch_gain_skill_on_majority_t2_secondary_diff_value = { + value = diarch_gain_skill_on_majority_t2_secondary_value + subtract = diarch_gain_skill_on_majority_t1_secondary_value +} +## T3 +diarch_gain_skill_on_majority_t3_primary_value = 4 +diarch_gain_skill_on_majority_t3_primary_diff_value = { + value = diarch_gain_skill_on_majority_t3_primary_value + subtract = diarch_gain_skill_on_majority_t2_primary_value +} +diarch_gain_skill_on_majority_t3_secondary_value = 3 +diarch_gain_skill_on_majority_t3_secondary_diff_value = { + value = diarch_gain_skill_on_majority_t3_secondary_value + subtract = diarch_gain_skill_on_majority_t2_secondary_value +} +## T4 +diarch_gain_skill_on_majority_t4_primary_value = 5 +diarch_gain_skill_on_majority_t4_primary_diff_value = { + value = diarch_gain_skill_on_majority_t4_primary_value + subtract = diarch_gain_skill_on_majority_t3_primary_value +} +diarch_gain_skill_on_majority_t4_secondary_value = 4 +diarch_gain_skill_on_majority_t4_secondary_diff_value = { + value = diarch_gain_skill_on_majority_t4_secondary_value + subtract = diarch_gain_skill_on_majority_t3_secondary_value +} diff --git a/common/script_values/00_dlc_fp3_script_values.txt b/common/script_values/00_dlc_fp3_script_values.txt new file mode 100644 index 00000000..efae91e3 --- /dev/null +++ b/common/script_values/00_dlc_fp3_script_values.txt @@ -0,0 +1,1436 @@ +############# +# FP3 Scripted Values +############# + +################################################## +# Unity + +critical_house_unity = 20 +terrible_house_unity = 40 +low_house_unity = 60 +mediocre_house_unity = 80 +average_house_unity = 100 +decent_house_unity = 120 +good_house_unity = 140 +high_house_unity = 160 +very_high_house_unity = 180 + +opinion_thresholds_for_antagonistic_independence = -50 + +number_of_futuwaa_members = { + value = 0 + every_courtier = { + limit = { fp3_is_valid_futuwaa_member = { SPONSOR = root } } + add = 1 + } + house ?= { + every_house_member = { + limit = { + fp3_is_valid_futuwaa_member = { SPONSOR = root } + NOT = { is_courtier_of = root } + } + add = 1 + } + } +} + +number_of_madrasa_pupils = { + value = 0 + every_courtier = { + limit = { fp3_is_valid_madrasa_pupil = { SPONSOR = root } } + add = 1 + } + house ?= { + every_house_member = { + limit = { + fp3_is_valid_madrasa_pupil = { SPONSOR = root } + NOT = { is_courtier_of = root } + } + add = 1 + } + } +} + +################################################## +# Struggle + +fp3_house_modifier_concession_ending_duration = 100 +fp3_house_modifier_sunder_caliphate_duration = 100 + +fp3_concession_death_countdown = { + value = current_year + subtract = 866 + multiply = 1 +} + +fp3_persia_ownage_percentage_for_foundation = 0.20 + +fp3_persia_supporter_rulers_decimal_value = { + value = 50 + divide = 100 + max = 1 +} + +fp3_persia_supporter_rulers_max_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + is_landed = yes + highest_held_title_tier >= tier_county + OR = { + NOT = { has_title = title:d_sunni } + OR = { + is_independent_ruler = yes + is_vassal_of = title:d_sunni.holder + } + } + } + add = 1 + } + } +} + +fp3_persia_supporter_rulers_half_value = { + value = fp3_persia_supporter_rulers_max_value + divide = 2 + ceiling = yes +} + +fp3_persia_supporter_rulers_count_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + is_landed = yes + highest_held_title_tier >= tier_county + OR = { + NOT = { has_title = title:d_sunni } + OR = { + is_independent_ruler = yes + is_vassal_of = title:d_sunni.holder + } + } + # Trigger + has_trait = fp3_struggle_supporter + } + add = 1 + } + } + floor = yes +} + +fp3_persia_iranian_rulers_count_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + is_landed = yes + highest_held_title_tier >= tier_county + culture = { has_cultural_pillar = heritage_iranian } + } + add = 1 + } + every_interloper_ruler = { + limit = { + is_landed = yes + highest_held_title_tier >= tier_county + culture = { has_cultural_pillar = heritage_iranian } + } + add = 1 + } + } + floor = yes +} + +fp3_persia_all_rulers_count_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + is_landed = yes + highest_held_title_tier >= tier_county + } + add = 1 + } + every_interloper_ruler = { + limit = { + is_landed = yes + highest_held_title_tier >= tier_county + } + add = 1 + } + } + floor = yes +} + +fp3_persia_all_rulers_requirement_value = { + value = fp3_persia_all_rulers_count_value + multiply = 0.6 +} + +fp3_persia_all_rulers_percentage_value = { + value = fp3_persia_iranian_rulers_count_value + divide = { + value = fp3_persia_all_rulers_count_value + min = 1 + } +} + +fp3_persia_independent_detractor_rulers_count_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + is_independent_ruler = yes + is_landed = yes + highest_held_title_tier >= tier_duchy + has_trait = fp3_struggle_detractor + } + add = 1 + } + every_interloper_ruler = { + limit = { + is_independent_ruler = yes + is_landed = yes + highest_held_title_tier >= tier_duchy + has_trait = fp3_struggle_detractor + } + add = 1 + } + } + floor = yes +} + +fp3_persia_independent_non_sunni_rulers_count_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + is_independent_ruler = yes + is_landed = yes + highest_held_title_tier >= tier_duchy + faith = { + NOT = { + has_doctrine = muhammad_succession_sunni_doctrine + } + } + } + add = 1 + } + every_interloper_ruler = { + limit = { + is_independent_ruler = yes + is_landed = yes + highest_held_title_tier >= tier_duchy + faith = { + NOT = { + has_doctrine = muhammad_succession_sunni_doctrine + } + } + } + add = 1 + } + } + floor = yes +} + +fp3_iranian_sub_realm_counties_value = { + value = 0 + every_sub_realm_county = { + limit = { + culture = { has_cultural_pillar = heritage_iranian } + } + add = 1 + } + floor = yes +} + +fp3_persia_flame_of_iran_independent_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + is_independent_ruler = no + culture = { has_cultural_pillar = heritage_iranian } + exists = liege + NOT = { + liege.culture = { has_cultural_pillar = heritage_iranian } + } + } + add = 1 + } + } +} + +# Paramameter for percentage of Persia you must control +fp3_persia_owned_for_rekindle_persia_percent_value = 30 + +# Uses above to plug in to script as a decimal +fp3_persia_owned_for_rekindle_persia_decimal_value = { + value = fp3_persia_owned_for_rekindle_persia_percent_value + divide = 100 + max = 1 +} + +fp3_iranian_current_owned_persia_value = { + value = 0 + every_county_in_region = { + region = world_persian_empire + limit = { + holder.top_liege = root + } + add = 1 + } + divide = { + value = 0 + every_county_in_region = { + region = world_persian_empire + add = 1 + } + } + multiply = 100 +} + +# Paramameter for percentage of Persia that must be iranian +fp3_iranian_culture_for_rekindle_persia_percent_value = 75 + +fp3_iranian_culture_for_rekindle_persia_decimal_value = { + value = fp3_iranian_culture_for_rekindle_persia_percent_value + divide = 100 + max = 1 +} + +fp3_iranian_culture_current_persian_culture_value = { + value = 0 + every_county_in_region = { + region = world_persian_empire + limit = { + culture = { has_cultural_pillar = heritage_iranian } + } + add = 1 + } + divide = { + value = 0 + every_county_in_region = { + region = world_persian_empire + add = 1 + } + } + multiply = 100 +} + +fp3_shia_caliphate_ending_conversion_chance_percent_value = 75 + +fp3_shia_caliphate_ending_conversion_chance_decimal_value = { + value = fp3_iranian_culture_for_rekindle_persia_percent_value + divide = 100 + max = 1 +} + +fp3_strengthen_caliphate_ending_conversion_chance_percent_value = 50 + +fp3_strengthen_caliphate_ending_conversion_chance_decimal_value = { + value = fp3_iranian_culture_for_rekindle_persia_percent_value + divide = 100 + max = 1 +} + +fp3_struggle_ending_conversion_modifier_value = 1.5 + +fp3_iranian_faith_for_rekindle_persia_conversion_chance_percent_value = 50 + +fp3_iranian_faith_for_rekindle_persia_conversion_chance_decimal_value = { + value = fp3_iranian_culture_for_rekindle_persia_percent_value + divide = 100 + max = 1 +} + +fp3_current_nb_ally_shia_caliphate = { + value = 0 + every_ally = { + limit = { highest_held_title_tier >= tier_kingdom } + add = 1 + } +} + +################################################## +# Tax Collector +tax_collector_aptitude_miniscule_increase = { value = 5 } + +tax_collector_aptitude_minor_increase = { value = 10 } + +tax_collector_aptitude_medium_increase = { value = 15 } + +tax_collector_aptitude_major_increase = { value = 20 } + +tax_collector_aptitude_massive_increase = { value = 25 } + + +tax_collector_aptitude_score = { + value = 1 + add = { + value = diplomacy + max = 50 + desc = court_position_skill_diplomacy + } + add = { + value = martial + max = 50 + desc = court_position_skill_martial + } + add = { + value = stewardship + max = 50 + desc = court_position_skill_stewardship + } + add = { + value = intrigue + max = 50 + desc = court_position_skill_intrigue + } + add = { + value = learning + multiply = 2 + max = 50 + desc = court_position_skill_learning + } + + if = { + limit = { + has_trait = just + } + add = { + value = 10 + desc = court_position_just_trait + } + } + if = { + limit = { + has_trait = diplomat + } + add = { + value = 10 + desc = court_position_diplomat_trait + } + } + if = { + limit = { + has_trait = administrator + } + add = { + value = 10 + desc = court_position_administrator_trait + } + } + if = { + limit = { + has_trait = avaricious + } + add = { + value = 10 + desc = court_position_avaricious_trait + } + } + if = { + limit = { + has_character_modifier = fp3_capable_magistrates_modifier + } + add = { + value = tax_collector_aptitude_major_increase + desc = capable_magistrates_modifier + } + } + if = { + limit = { + has_character_flag = fp3_inspired_tax_collector + } + add = { + value = 20 + desc = fp3_inspired_tax_collector + } + } + # Opinion of liege + add = { + desc = opinion_of_liege + value = { + if = { + limit = { + save_temporary_opinion_value_as = { name = target_opinion target = liege} + scope:target_opinion >= very_high_positive_opinion + } + add = 20 + } + else_if = { + limit = { + save_temporary_opinion_value_as = { name = target_opinion target = liege } + scope:target_opinion >= high_positive_opinion + } + add = 15 + } + else_if = { + limit = { + save_temporary_opinion_value_as = { name = target_opinion target = liege } + scope:target_opinion >= medium_positive_opinion + } + add = 10 + } + else_if = { + limit = { + save_temporary_opinion_value_as = { name = target_opinion target = liege } + scope:target_opinion >= low_positive_opinion + } + add = 5 + } + else = { + add = 0 + } + } + } + + # Cultural Tradition + if = { + limit = { + culture = { has_cultural_parameter = characters_are_better_tax_collector } + } + add = { + value = tax_collector_aptitude_medium_increase + desc = traditions_cheaper_value + } + } + + # Flag Check (for debug/event usage) - Use debug.9610 + if = { + limit = { has_character_flag = is_guaranteed_excellent_tax_collector } + add = 110 + } + + add = court_position_aptitude_family_business_value + add = court_position_aptitude_eunuch_tradition_value + + # Viziers + if = { + limit = { + liege ?= { + exists = diarch + has_diarchy_active_parameter = diarch_aptitude_helps_tax_collectors_toggle + } + } + # Are we the vizier? If yes, we get a flat boost tied to our Scales of Power swing. + if = { + limit = { this = liege.diarch } + add = { + value = diarch_aptitude_helps_tax_collectors_buffed_by_swing_value + desc = diarchy_tax_collector_boost.scales_of_power + } + } + # Else we're someone different, so we get a fraction of the vizier's aptitude added to our own. + else = { + ## Plenty of vizier's aptitude. + if = { + limit = { + liege = { has_diarchy_active_parameter = diarch_aptitude_helps_tax_collectors_t4 } + } + add = { + value = { + value = liege.diarch.tax_collector_aptitude_score + # But remove the buff the vizier got from the SoP swing or things'll get ridiculous. + subtract = diarch_aptitude_helps_tax_collectors_buffed_by_swing_value + # Now, reduce according to the correct percentage. + multiply = diarch_aptitude_helps_tax_collectors_t4_value + # Just in case, let's min things. + min = 1 + } + desc = diarchy_tax_collector_boost.diarch_aptitude.t4 + } + } + ## Most of vizier's aptitude. + else_if = { + limit = { + liege = { has_diarchy_active_parameter = diarch_aptitude_helps_tax_collectors_t3 } + } + add = { + value = { + value = liege.diarch.tax_collector_aptitude_score + # But remove the buff the vizier got from the SoP swing or things'll get ridiculous. + subtract = diarch_aptitude_helps_tax_collectors_buffed_by_swing_value + # Now, reduce according to the correct percentage. + multiply = diarch_aptitude_helps_tax_collectors_t3_value + # Just in case, let's min things. + min = 1 + } + desc = diarchy_tax_collector_boost.diarch_aptitude.t3 + } + } + ## Some of vizier's aptitude. + else_if = { + limit = { + liege = { has_diarchy_active_parameter = diarch_aptitude_helps_tax_collectors_t2 } + } + add = { + value = { + value = liege.diarch.tax_collector_aptitude_score + # But remove the buff the vizier got from the SoP swing or things'll get ridiculous. + subtract = diarch_aptitude_helps_tax_collectors_buffed_by_swing_value + # Now, reduce according to the correct percentage. + multiply = diarch_aptitude_helps_tax_collectors_t2_value + # Just in case, let's min things. + min = 1 + } + desc = diarchy_tax_collector_boost.diarch_aptitude.t2 + } + } + ## A little of vizier's aptitude. + else_if = { + limit = { + liege = { has_diarchy_active_parameter = diarch_aptitude_helps_tax_collectors_t1 } + } + add = { + value = { + value = liege.diarch.tax_collector_aptitude_score + # But remove the buff the vizier got from the SoP swing or things'll get ridiculous. + subtract = diarch_aptitude_helps_tax_collectors_buffed_by_swing_value + # Now, reduce according to the correct percentage. + multiply = diarch_aptitude_helps_tax_collectors_t1_value + # Just in case, let's min things. + min = 1 + } + desc = diarchy_tax_collector_boost.diarch_aptitude.t1 + } + } + } + } +} + +diarch_aptitude_helps_tax_collectors_buffed_by_swing_multiplier_value = 0.5 +diarch_aptitude_helps_tax_collectors_buffed_by_swing_value = { + value = liege.diarchy_swing + multiply = diarch_aptitude_helps_tax_collectors_buffed_by_swing_multiplier_value +} +diarch_aptitude_helps_tax_collectors_t1_value = 0.1 +diarch_aptitude_helps_tax_collectors_t2_value = 0.2 +diarch_aptitude_helps_tax_collectors_t3_value = 0.4 +diarch_aptitude_helps_tax_collectors_t4_value = 0.6 + + +preferred_tax_collector_modifier = { + value = 0 + if = { # Let's prioritize any close family members (cause that's more interesting) + add = 25 + limit = { + is_close_family_of = root + } + } +} +################################################## + +################################################## +# Decisions +embellish_capital_gold_cost = { value = major_gold_value } + +claim_the_imamate_decision_same_faith_county_count = 5 + +claim_the_imamate_decision_same_faith_greater_county_count = 15 + +claim_the_imamate_decision_own_max_sins = 1 + +promote_persian_scripture_piety_cost = { value = major_piety_value } + +promote_persian_scripture_conversion_modifier_value = 1.5 + +promote_persian_scripture_fundamentalist_stress_value = { value = major_stress_gain } + +consulted_house_councillors_percentage = 10 + +favour_skilled_outsiders_decision_prestige_cost_value = { + # Scales to tier. + ## Counts pay basically nothing. + if = { + limit = { highest_held_title_tier = tier_county } + add = minor_prestige_value + } + ## Dukes pay a bit. + else_if = { + limit = { highest_held_title_tier = tier_duchy } + add = medium_prestige_value + } + ## Kings pay a moderate amount. + else_if = { + limit = { highest_held_title_tier = tier_kingdom } + add = 225 + } + ## Emperors pay a substantial amount. + else_if = { + limit = { highest_held_title_tier = tier_empire } + add = 300 + } +} + + +favour_skilled_outsiders_decision_skill_threshold_value = high_skill_rating + +favour_skilled_outsiders_decision_tally_offended_courtlies_value = { + value = 0 + every_vassal = { + limit = { favour_skilled_outsiders_decision_grab_courtlies_trigger = yes } + } + add = 1 +} + +favour_skilled_outsiders_decision_tally_offended_landless_councillors_value = { + value = 0 + every_councillor = { + limit = { favour_skilled_outsiders_decision_grab_landless_councillors_trigger = yes } + } + add = 1 +} + +favour_skilled_outsiders_decision_tally_offended_non_courtlies_value = { + value = 0 + every_vassal = { + limit = { favour_skilled_outsiders_decision_non_courtlies_trigger = yes } + } + add = 1 +} + +fp3_skilled_outsider_template_diplomacy_min_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_diplomacy_martial = yes } + # Guarantee a nice minimum rather than using the usual variance rules. + add = high_skill_rating + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + # And again, guarantee a nice minimum without variance. + add = decent_skill_rating + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = min_template_low_skill } +} + +fp3_skilled_outsider_template_diplomacy_max_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_diplomacy_martial = yes } + add = max_template_high_skill + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + add = max_template_decent_skill + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = max_template_low_skill } +} + +fp3_skilled_outsider_template_martial_min_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_martial_prowess = yes } + # Guarantee a nice minimum rather than using the usual variance rules. + add = high_skill_rating + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_diplomacy_martial = yes } + # And again, guarantee a nice minimum without variance. + add = decent_skill_rating + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = min_template_low_skill } +} + +fp3_skilled_outsider_template_martial_max_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_martial_prowess = yes } + add = max_template_high_skill + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_diplomacy_martial = yes } + add = max_template_decent_skill + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = max_template_low_skill } +} + +fp3_skilled_outsider_template_stewardship_min_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + # Guarantee a nice minimum rather than using the usual variance rules. + add = high_skill_rating + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_intrigue_stewardship = yes } + # And again, guarantee a nice minimum without variance. + add = decent_skill_rating + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = min_template_low_skill } +} + +fp3_skilled_outsider_template_stewardship_max_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + add = max_template_high_skill + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_intrigue_stewardship = yes } + add = max_template_decent_skill + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = max_template_low_skill } +} + +fp3_skilled_outsider_template_intrigue_min_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_intrigue_stewardship = yes } + # Guarantee a nice minimum rather than using the usual variance rules. + add = high_skill_rating + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_learning_intrigue = yes } + # And again, guarantee a nice minimum without variance. + add = decent_skill_rating + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = min_template_low_skill } +} + +fp3_skilled_outsider_template_intrigue_max_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_intrigue_stewardship = yes } + add = max_template_high_skill + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_learning_intrigue = yes } + add = max_template_decent_skill + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = max_template_low_skill } +} + +fp3_skilled_outsider_template_learning_min_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_learning_intrigue = yes } + # Guarantee a nice minimum rather than using the usual variance rules. + add = high_skill_rating + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_prowess_learning = yes } + # And again, guarantee a nice minimum without variance. + add = decent_skill_rating + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = min_template_low_skill } +} + +fp3_skilled_outsider_template_learning_max_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_learning_intrigue = yes } + add = max_template_high_skill + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_prowess_learning = yes } + add = max_template_decent_skill + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = max_template_low_skill } +} + +fp3_skilled_outsider_template_prowess_min_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_prowess_learning = yes } + # Guarantee a nice minimum rather than using the usual variance rules. + add = high_skill_rating + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_martial_prowess = yes } + # And again, guarantee a nice minimum without variance. + add = decent_skill_rating + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = min_template_low_skill } +} + +fp3_skilled_outsider_template_prowess_max_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_prowess_learning = yes } + add = max_template_high_skill + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_martial_prowess = yes } + add = max_template_decent_skill + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = max_template_low_skill } +} + +fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value = { + # Three points above... + value = 3 + if = { + limit = { scope:outsider_diplomacy_martial = yes } + add = diplomacy + } + if = { + limit = { scope:outsider_martial_prowess = yes } + add = martial + } + if = { + limit = { scope:outsider_prowess_learning = yes } + add = prowess + } + if = { + limit = { scope:outsider_learning_intrigue = yes } + add = learning + } + if = { + limit = { scope:outsider_intrigue_stewardship = yes } + add = intrigue + } + if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + add = stewardship + } +} + +fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value = { + # Two points below... + value = -2 + if = { + limit = { scope:outsider_diplomacy_martial = yes } + add = diplomacy + } + if = { + limit = { scope:outsider_martial_prowess = yes } + add = martial + } + if = { + limit = { scope:outsider_prowess_learning = yes } + add = prowess + } + if = { + limit = { scope:outsider_learning_intrigue = yes } + add = learning + } + if = { + limit = { scope:outsider_intrigue_stewardship = yes } + add = intrigue + } + if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + add = stewardship + } +} + +################################################## +# Military +fp3_realm_based_mercenary_cost = { + # Sample formula + # X * (Y + (Z/10) # Real example: 1162 * (0.6 + (4 / 10)) = 1162, meaning that if you have 4 counties, you get no discount, but no increase either. + # X is the initial cost. It is not in the operation above because it is applied post-facto as a modifier. + # Y is our base value, since we want to make the initial cost cheaper with a multiplication, it is a decimal. I chose 0.6, but it can be tweaked. + # Z is realm size. We turn it into a decimal so that it can then be added to our base value (Y), increasing the cost to either a lesser discount or an upsell based on size. + value = 0.6 + add = { + value = sub_realm_size + divide = 10 + } +} + +fp3_request_invasion_troop_value_estimate = { + value = scope:recipient.max_military_strength + subtract = scope:secondary_recipient.max_military_strength + divide = 20 + round = yes +} + +fp3_request_invasion_troop_value_bonus_troops = { + value = scope:recipient.max_military_strength + subtract = scope:secondary_recipient.max_military_strength + divide = 500 + round = yes + min = 1 + max = 10 +} + +fp3_request_invasion_troop_value_bonus_levy_troops = { + value = fp3_request_invasion_troop_value_bonus_troops + multiply = 100 +} + + + +# The cost in gold of sponsoring a new research project +fp3_research_base_cost = { + value = medium_gold_value +} + + +################################################## +# Seljuk invaion + +fp3_seljuk_chance_of_appearance = 10 +fp3_chance_female_leader = { + value = 0 + if = { + limit = { has_game_rule = inversed_gender_equality } + add = 100 + } + else_if = { + limit = { has_game_rule = full_gender_equality } + add = 50 + } + else = { + add = 0 + } +} + +fp3_seljuk_invasion_troop_gain_minor = 1 +fp3_seljuk_invasion_troop_gain_small = 2 +fp3_seljuk_invasion_troop_gain_medium = 3 +fp3_seljuk_invasion_troop_gain_major = 4 +fp3_seljuk_invasion_troop_gain_massive = 5 + +fp3_seljuk_stack_miniscule_value = 0.6 +fp3_seljuk_stack_minor_value = 0.8 +fp3_seljuk_stack_medium_value = 1 +fp3_seljuk_stack_major_value = 1.25 +fp3_seljuk_stack_massive_value = 1.5 +fp3_seljuk_stack_monumental_value = 2 + +seljuk_invasion_nomad_strength_score_levy = { + value = 0 + if = { + limit = { has_variable = seljuk_invasion_nomad_strength_score } + add = var:seljuk_invasion_nomad_strength_score + } + multiply = 100 +} + +seljuk_invasion_nomad_strength_score_siege_weapon = { + value = 0 + if = { + limit = { has_variable = seljuk_invasion_nomad_strength_score } + add = var:seljuk_invasion_nomad_strength_score + } + multiply = 0.5 +} + +# Zanj Rebellion + +zanj_rebellion_strength_score_levy = { + value = 0 + if = { + limit = { has_variable = zanj_rebellion_strength_score } + add = var:zanj_rebellion_strength_score + } + multiply = 200 +} + +zanj_rebellion_strength_score_skirmishers = { + value = 0 + if = { + limit = { has_variable = zanj_rebellion_strength_score } + add = var:zanj_rebellion_strength_score + } +} + +zanj_rebellion_strength_score_bowmen = { + value = 0 + if = { + limit = { has_variable = zanj_rebellion_strength_score } + add = var:zanj_rebellion_strength_score + } + multiply = 0.5 +} + +zanj_rebellion_strength_score_pikemen = { + value = 0 + if = { + limit = { has_variable = zanj_rebellion_strength_score } + add = var:zanj_rebellion_strength_score + } + multiply = 0.5 +} + +rescue_house_members_cb_house_unity_gain = { + scope:defender = { + every_prisoner = { + limit = { house ?= scope:attacker.house } + add = medium_unity_gain + } + } + + max = 20 +} + +fp3_struggle_switch_sides_value = { + value = 0 + if = { + limit = { + has_trait = fp3_struggle_supporter + NAND = { + faith = { has_doctrine = muhammad_succession_sunni_doctrine } + has_trait = zealous + } + exists = title:d_sunni.holder + NOR = { + this = title:d_sunni.holder + has_relation_friend = title:d_sunni.holder + has_relation_lover = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 50 + } + } + } + if = { + limit = { + has_trait = ambitious + } + add = 10 + } + if = { + limit = { + has_trait = cynical + } + add = 20 + } + if = { + limit = { + has_trait = vengeful + } + add = 5 + } + if = { + limit = { + has_trait = arrogant + } + add = 10 + } + if = { + limit = { + has_trait = arbitrary + } + add = 5 + } + if = { + limit = { + has_trait = disloyal + } + add = 30 + } + if = { + limit = { + has_trait = fickle + } + add = 5 + } + if = { + limit = { + culture = { has_cultural_pillar = heritage_turkic } + } + add = 50 + } + if = { + limit = { + NOT = { + faith = { has_doctrine = muhammad_succession_sunni_doctrine } + } + } + add = 200 + } + if = { + limit = { + ai_zeal < 0 + } + add = { + value = ai_zeal + multiply = -1 + divide = 4 + } + } + if = { + limit = { + exists = title:d_sunni.holder + has_relation_rival = title:d_sunni.holder + } + add = 200 + } + if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -75 + } + } + add = 50 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -50 + } + } + add = 40 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -30 + } + } + add = 30 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -10 + } + } + add = 20 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= 0 + } + } + add = 10 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 40 + } + } + add = -30 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 30 + } + } + add = -20 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 20 + } + } + add = -10 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 10 + } + } + add = -5 + } + } + else_if = { + limit = { + has_trait = fp3_struggle_detractor + exists = title:d_sunni.holder + NOR = { + has_relation_rival = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -50 + } + } + } + if = { + limit = { + has_trait = content + } + add = 20 + } + if = { + limit = { + has_trait = zealous + } + add = 30 + } + if = { + limit = { + has_trait = trusting + } + add = 10 + } + if = { + limit = { + has_trait = just + } + add = 10 + } + if = { + limit = { + has_trait = humble + } + add = 20 + } + if = { + limit = { + has_trait = loyal + } + add = 30 + } + if = { + limit = { + culture = { has_cultural_pillar = heritage_turkic } + } + add = -50 + } + if = { + limit = { + NOT = { + faith = { has_doctrine = muhammad_succession_sunni_doctrine } + } + } + add = -200 + } + if = { + limit = { + ai_zeal > 0 + faith = { has_doctrine = muhammad_succession_sunni_doctrine } + } + add = { + value = ai_zeal + multiply = -1 + divide = 4 + } + } + if = { + limit = { + exists = title:d_sunni.holder + OR = { + has_relation_friend = title:d_sunni.holder + has_relation_lover = title:d_sunni.holder + } + } + add = 200 + } + if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 75 + } + } + add = 50 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 50 + } + } + add = 40 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 30 + } + } + add = 20 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 10 + } + } + add = 5 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -40 + } + } + add = -50 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -30 + } + } + add = -40 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -20 + } + } + add = -30 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= 0 + } + } + add = -20 + } + } +} diff --git a/common/script_values/00_faction_values.txt b/common/script_values/00_faction_values.txt new file mode 100644 index 00000000..82f15db4 --- /dev/null +++ b/common/script_values/00_faction_values.txt @@ -0,0 +1,126 @@ +################### +# FACTION VALUES # +################### + +base_discontent_progress = 3 + +minor_discontent_gain = 10 +medium_discontent_gain = 20 +major_discontent_gain = 30 +minor_discontent_loss = -10 +medium_discontent_loss = -20 +major_discontent_loss = -30 +massive_discontent_loss = -50 + +faction_war_white_peace_cooldown = 5 # years +faction_war_defeat_cooldown = 10 # years + +faction_nation_fracturing_war_white_peace_cooldown = 15 # years +faction_nation_fracturing_war_defeat_cooldown = 30 # years + + +liberty_war_victory_cooldown = 5 + +# Values for the AI to evaluate how powerful factions are relative to each other. +faction_power_minimal = { + value = faction_power_threshold + multiply = 0.25 +} +faction_power_halfway_threshold = { + value = faction_power_threshold + multiply = 0.50 +} +faction_power_pushing_threshold = { + value = faction_power_threshold + multiply = 0.75 +} + +faction_weight_factor_power_minimal_penalty = 0.5 +faction_weight_factor_power_halfway_threshold = 1.20 # +20% total faction weight +faction_weight_factor_power_pushing_threshold = 1.5 # +50% total faction weight +faction_weight_factor_power_exceeds_threshold = 2 # +100% total faction weight + +faction_discontent_for_extra_power = { + value = base_discontent_progress + multiply = { # We want discontent to increase gradually as a faction grows their military power. + value = faction_power + subtract = faction_power_threshold + divide = faction_power_threshold # To get the % over the power threshold we are. + multiply = 4 # At 25% bonus faction power, discontent increases 100% faster (compared to the base gain). + } + round = yes # To avoid having it say +0... + max = 10 # Minimum 8 months to reach 100% discontent (no insta-revolts, no matter how powerful the faction is). +} + +total_county_levies = { + value = 0 + + # Get the base levies from each province. + every_in_de_jure_hierarchy = { + limit = { + tier = tier_barony + } + title_province = { + add = building_levies + } + } + + # Levy size multipliers (excluding ruler-specific modifiers, such as Martial skill). + multiply = { + # 100% Levy Base + value = 1 + + # Adds bonus levies from Development (at base 20 development, +20% levies). + add = { + add = development_level + multiply = 0.01 + } + + # Adds bonus levies from cultural innovations. + if = { + limit = { + culture = { + has_innovation = innovation_bannus + } + } + add = 0.1 + } + } +} + +county_levies_to_raise = { + value = total_county_levies + + # Will summon between 75% and 175% of total county levy strength, depending on how much they hate you (most commonly will be 95-110% though, scores between -20 and -35 are the most common) + multiply = { + value = county_opinion + multiply = -0.01 + add = 0.5 + } + min = { + value = building_max_garrison + multiply = 1.2 + } +} + +county_maa_to_raise = { + value = total_county_levies + + # Based on county levy strength, summon an appropiate number of MAAs that scales with popular opinion. + multiply = { + value = county_opinion + multiply = -0.00003 + } + round = yes + min = 1 +} + +peasant_war_victory_county_control_loss = -75 +peasant_war_starts_county_control_loss = -25 + +liege_opinion_value = { + value = scope:opinion_of_current_liege +} + +# How many years of truce do you get with a faction's members for appointing their leader as co-emperor? +faction_counter_offer_appointed_co_emperor_value = 10 diff --git a/common/script_values/00_goverment_values.txt b/common/script_values/00_goverment_values.txt new file mode 100644 index 00000000..b2775aa5 --- /dev/null +++ b/common/script_values/00_goverment_values.txt @@ -0,0 +1,186 @@ +################### +# GOVERNMENT VALUES # +################### + +clan_government_levies_default = 0.04 +clan_government_levies_player = 0.25 + +clan_government_tax_default = 0.02 +clan_government_tax_player = 0.25 + +clan_government_tax_collector_aptitude_multiplier = { + value = { + if = { + limit = { + check_tax_collector_aptitude = { + CHARACTER = scope:tax_collector + VALUE = 5 + } + } + add = 15 + } + else_if = { + limit = { + check_tax_collector_aptitude = { + CHARACTER = scope:tax_collector + VALUE = 4 + } + } + add = 10 + } + else_if = { + limit = { + check_tax_collector_aptitude = { + CHARACTER = scope:tax_collector + VALUE = 3 + } + } + add = 6 + } + else_if = { + limit = { + check_tax_collector_aptitude = { + CHARACTER = scope:tax_collector + VALUE = 2 + } + } + add = 3 + } + else_if = { + limit = { + check_tax_collector_aptitude = { + CHARACTER = scope:tax_collector + VALUE = 1 + } + } + add = 1 + } + else = { + add = 0 + } + } +} + +clan_government_levies_max_possible = { + value = clan_government_levies_default +} + +clan_government_tax_max_possible = { + value = clan_government_tax_default +} + +default_tax_obligation_ai_will_do = { + value = 1 + if = { + limit = { + scope:is_current_obligation = yes + } + add = 1 + } +} + +tax_obligation_base_ai_will_do = { + value = default_tax_obligation_ai_will_do + subtract = scope:num_slots_with_obligation # Give the AI some variety +} + +tax_obligation_half_of_slot = { + value = scope:num_vassal_slots + divide = 2 +} + +#Feudal government values +exempt_feudal_tax = 0 +low_feudal_tax = 0.025 +normal_feudal_tax = 0.1 +high_feudal_tax = 0.15 +extortionate_feudal_tax = 0.25 + +feudal_tax_exempt_level = 0 +feudal_tax_low_level = 1 +feudal_tax_normal_level = 2 +feudal_tax_high_level = 3 +feudal_tax_extortionate_level = 4 + +feudal_levies_exempt_level = 0 +feudal_levies_low_level = 1 +feudal_levies_normal_level = 2 +feudal_levies_high_level = 3 +feudal_levies_extortionate_level = 4 + +scutage_contract_tax = 0.5 +scutage_contract_tax_tooltip = { + value = scutage_contract_tax + multiply = 100 +} +scutage_contract_levies = -0.75 +scutage_contract_levies_tooltip = { + value = scutage_contract_levies + multiply = 100 + multiply = -1 +} +march_contract_taxes = -0.5 +march_contract_taxes_tooltip = { + value = march_contract_taxes + multiply = 100 + multiply = -1 +} +castellan_contract_levies = 0.5 +castellan_contract_levies_tooltip = { + value = castellan_contract_levies + multiply = 100 +} +palatinate_contract_taxes = -0.2 +palatinate_contract_levies = -0.2 +palatinate_contract_taxes_tooltip = { + value = palatinate_contract_taxes + multiply = 100 + multiply = -1 +} +fortification_rights_contract_taxes = -0.10 +fortification_rights_contract_taxes_tooltip = { + value = fortification_rights_contract_taxes + multiply = 100 + multiply = -1 +} +succession_rights_contract_law_cost = 0.25 +succession_rights_contract_law_cost_tooltip = { + value = succession_rights_contract_law_cost + multiply = 100 +} +war_declaration_rights_allowed_cost_reduction = 0.5 +war_declaration_rights_allowed_cost_reduction_tooltip = { + value = war_declaration_rights_allowed_cost_reduction + multiply = 100 +} +max_contract_changes = 3 + +family_entrepreneurship_tax = 1 +family_entrepreneurship_tax_tooltip = { + value = family_entrepreneurship_tax + multiply = 100 +} +centralized_power_levies = 0.5 +centralized_power_levies_tooltip = { + value = centralized_power_levies + multiply = 100 +} +centralized_power_tax = -1 + + +ghazi_religious_war_cost_reduction = 0.5 +ghazi_religious_war_cost_reduction_tooltip = { + value = ghazi_religious_war_cost_reduction + multiply = 100 +} + +ghazi_prestige_cost_increments = 0.25 +ghazi_prestige_cost_increments_tooltip = { + value = ghazi_prestige_cost_increments + multiply = 100 +} + +#maguh_development_value = { +# value = 0.01 +# multiply = clan_government_tax_collector_aptitude_multiplier +#} diff --git a/common/script_values/00_interaction_values.txt b/common/script_values/00_interaction_values.txt new file mode 100644 index 00000000..65546007 --- /dev/null +++ b/common/script_values/00_interaction_values.txt @@ -0,0 +1,809 @@ +golden_obligation_value = { + if = { + limit = { + ransom_cost_value < medium_gold_value + ransom_cost_value > minor_gold_value + } + value = minor_gold_value + } + else_if = { + limit = { + ransom_cost_value < medium_gold_value + ransom_cost_value < minor_gold_value + } + value = ransom_cost_value + } + else = { + value = medium_gold_value + } +} + +golden_obligation_value_check_current_situation = { + add = gold + max = golden_obligation_value +} + +ransom_cost_value = { + value = ransom_cost + # Some cultures are better at ransoming than others. + if = { + limit = { + exists = imprisoner + imprisoner.culture = { has_cultural_parameter = can_demand_higher_ransoms_from_lower_tiers } + # Kings and emperors are already worth more, so we just boost landless and ducal-tier or below. + OR = { + NOT = { exists = liege } + highest_held_title_tier <= tier_duchy + } + } + multiply = 1.5 + } + # Rich guests can pay a bit more... + if = { + limit = { + NOT = { exists = liege } + gold >= 100 + } + add = 90 + } + #increase it if the imprisoner has a Haggler Officer employed + if = { + limit = { + exists = scope:imprisoner + scope:imprisoner ?= { + employs_court_position = person_haggler_camp_officer + } + } + multiply = { + value = scope:imprisoner.court_position:person_haggler_camp_officer.aptitude:person_haggler_camp_officer + add = 1 + divide = 15 + add = 1 + } + } + if = { + limit = { + imprisoner ?= { + employs_court_position = person_haggler_camp_officer + } + } + multiply = { + value = imprisoner.court_position:person_haggler_camp_officer.aptitude:person_haggler_camp_officer + add = 1 + divide = 15 + add = 1 + } + } + #decrease it if the imprisoned has a Haggler Officer employed + if = { + limit = { + OR = { + AND = { + exists = scope:imprisoner + scope:recipient ?= scope:imprisoner + } + AND = { + exists = imprisoner + scope:recipient ?= imprisoner + } + } + scope:actor ?= { + employs_court_position = person_haggler_camp_officer + } + } + divide = { + value = scope:actor.court_position:person_haggler_camp_officer.aptitude:person_haggler_camp_officer + add = 1 + divide = 10 + add = 1 + } + } + #decrease it if the imprisoned has a Haggler Officer employed + if = { + limit = { + OR = { + AND = { + exists = scope:imprisoner + scope:actor ?= scope:imprisoner + } + AND = { + exists = imprisoner + scope:actor ?= imprisoner + } + } + scope:recipient ?= { + employs_court_position = person_haggler_camp_officer + } + } + divide = { + value = scope:recipient.court_position:person_haggler_camp_officer.aptitude:person_haggler_camp_officer + add = 1 + divide = 10 + add = 1 + } + } +} + +current_situation_gold_ransom = { + if = { + limit = { + NOT = { + exists = liege + } + } + add = gold + } + else_if = { + limit = { + is_ruler = no + } + add = liege.gold + } + else = { + add = gold + } + max = ransom_cost_value +} + +half_ransom_cost_value = { + value = { + add = ransom_cost_value + divide = 2 + min = 1 + } +} + +half_increased_ransom_cost_value = { + value = { + add = increased_ransom_cost_value + divide = 2 + min = 1 + } +} + +increased_ransom_cost_value = { + value = { + add = ransom_cost_value + multiply = 1.5 + } +} + +increased_ransom_cost = { + value = { + add = ransom_cost + multiply = 1.5 + } +} + +#reverse all ransom_cost_value calculations leaving just the haggler value and show it in all ransom interation windows +haggler_ransom_cost_modifier = { + value = ransom_cost_value + # Rich guests can pay a bit more... + if = { + limit = { + NOT = { exists = liege } + gold >= 100 + } + subtract = 90 + } + if = { + limit = { + exists = imprisoner + imprisoner.culture = { has_cultural_parameter = can_demand_higher_ransoms_from_lower_tiers } + # Kings and emperors are already worth more, so we just boost landless and ducal-tier or below. + OR = { + NOT = { exists = liege } + highest_held_title_tier <= tier_duchy + } + } + divide = 1.5 + } + subtract = ransom_cost +} + +grant_title_opinion_sum_baronies = { + if = { # if no other titles present, calc for baronies + limit = { + any_in_list = { + list = titles_to_grant + tier = tier_barony + } + } + + every_in_list = { + list = titles_to_grant + limit = { + tier = tier_barony + } + add = 20 # barony grant opinion + } + } +} + +grant_title_opinion_sum_counties = { + if = { # if no higher titles present, calc for counties + limit = { + any_in_list = { + list = titles_to_grant + tier = tier_county + } + } + + every_in_list = { + list = titles_to_grant + limit = { + tier = tier_county + } + add = 40 # county grant opinion + } + } +} + +grant_title_opinion_sum_duchies = { + if = { + limit = { + any_in_list = { + list = titles_to_grant + tier = tier_duchy + } + } + + every_in_list = { + list = titles_to_grant + limit = { + tier = tier_duchy + } + add = 60 # county grant opinion + } + } +} + +grant_title_opinion_sum_kingdoms = { + if = { + limit = { + any_in_list = { + list = titles_to_grant + tier = tier_kingdom + } + } + + every_in_list = { + list = titles_to_grant + limit = { + tier = tier_kingdom + } + add = 80 # kingdom grant opinion + } + } +} + +grant_title_opinion_sum_empires = { + if = { + limit = { + any_in_list = { + list = titles_to_grant + tier = tier_empire + } + } + + every_in_list = { + list = titles_to_grant + limit = { + tier = tier_empire + } + add = 100 # empire grant opinion + } + } +} + +# Used in the corresponding character interaction +# when granting a title to the member of a faction. +grant_title_opinion_sum_discontent_calc = { + value = 0 + + add = { + if = { + limit = { + grant_title_opinion_sum_empires > 0 + } + add = { + value = grant_title_opinion_sum_empires + multiply = 0.6 + } + } + if = { + limit = { + grant_title_opinion_sum_kingdoms > 0 + } + add = { + value = grant_title_opinion_sum_kingdoms + divide = 2 + } + } + if = { + limit = { + grant_title_opinion_sum_duchies > 0 + } + add = { + value = grant_title_opinion_sum_duchies + divide = 3 + } + } + if = { + limit = { + grant_title_opinion_sum_counties > 0 + } + add = { + value = grant_title_opinion_sum_counties + divide = 4 + } + } + if = { + limit = { + grant_title_opinion_sum_baronies > 0 + } + add = { + value = grant_title_opinion_sum_baronies + divide = 4 + } + } + } + + # Discontent should *drop* when someone is granted a title + multiply = -1 +} + +courtly_vassal_lowborn_grant_penalty = { + if = { + limit = { + any_in_list = { + list = titles_to_grant + tier >= tier_county + } + } + + every_in_list = { + list = titles_to_grant + limit = { + tier = tier_county + } + add = -5 + } + + every_in_list = { + list = titles_to_grant + limit = { + tier = tier_duchy + } + add = -20 + } + + every_in_list = { + list = titles_to_grant + limit = { + tier > tier_duchy + } + add = -50 + } + } +} + +number_of_courtly_vassals = { + value = 0 + every_vassal = { + limit = { + has_vassal_stance = courtly + } + add = 1 + } +} + +number_of_participating_courtly_vassals = { + value = 0 + every_vassal = { + limit = { + has_vassal_stance = courtly + is_participant_in_activity = root.involved_activity + } + add = 1 + } +} + +number_of_glory_hound_vassals = { + value = 0 + every_vassal = { + limit = { + has_vassal_stance = glory_hound + } + add = 1 + } +} + +number_of_participating_glory_hound_vassals = { + value = 0 + every_vassal = { + limit = { + has_vassal_stance = glory_hound + is_participant_in_activity = root.involved_activity + } + add = 1 + } +} + +number_of_parochial_vassals = { + value = 0 + every_vassal = { + limit = { + has_vassal_stance = parochial + } + add = 1 + } +} + +number_of_participating_parochial_vassals = { + value = 0 + every_vassal = { + limit = { + has_vassal_stance = parochial + is_participant_in_activity = root.involved_activity + } + add = 1 + } +} + +number_of_zealot_vassals = { + value = 0 + every_vassal = { + limit = { + has_vassal_stance = zealot + } + add = 1 + } +} + +number_of_participating_zealot_vassals = { + value = 0 + every_vassal = { + limit = { + has_vassal_stance = zealot + is_participant_in_activity = root.involved_activity + } + add = 1 + } +} + +number_of_minority_vassals = { + value = 0 + every_vassal = { + limit = { + has_vassal_stance = minority + } + add = 1 + } +} + +number_of_barons_and_minor_landholders_vassals = { + value = 0 + every_vassal = { + limit = { + has_vassal_stance = barons_and_minor_landholders + } + add = 1 + } +} + +council_position_locked_value = { + value = 25 +} + +marriage_fertile_age_value = { + value = { + add = 16 + subtract = scope:secondary_recipient.age + add = scope:secondary_actor.age + } +} + +marriage_fertile_age_reverse_value = { + value = { + add = 16 + subtract = scope:secondary_actor.age + add = scope:secondary_recipient.age + } +} + +marriage_female_fertility_cutoff_age_value = { + value = { + add = define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE + add = -3 + if = { + limit = { + has_trait = fecund + } + add = 5 + } + if = { + limit = { + exists = dynasty + dynasty = { + has_dynasty_perk = blood_legacy_5 + } + } + add = 5 + } + } +} + +offer_vassalage_acceptance_value = { + value = { + add = -35 + if = { + limit = { + scope:actor.culture = { + cultural_acceptance = { target = scope:recipient.culture value >= 80 } + } + } + add = { + value = 33 + } + } + else_if = { + limit = { + scope:actor.culture = { + cultural_acceptance = { target = scope:recipient.culture value >= 70 } + } + } + add = { + value = 30 + } + } + else_if = { + limit = { + scope:actor.culture = { + cultural_acceptance = { target = scope:recipient.culture value >= 60 } + } + } + add = { + value = 25 + } + } + else_if = { + limit = { + scope:actor.culture = { + cultural_acceptance = { target = scope:recipient.culture value >= 50 } + } + } + add = { + value = 20 + } + } + else_if = { + limit = { + scope:actor.culture = { + cultural_acceptance = { target = scope:recipient.culture value >= 40 } + } + } + add = { + value = 15 + } + } + else_if = { + limit = { + scope:actor.culture = { + cultural_acceptance = { target = scope:recipient.culture value >= 30 } + } + } + add = { + value = 10 + } + } + else_if = { + limit = { + scope:actor.culture = { + cultural_acceptance = { target = scope:recipient.culture value >= 20 } + } + } + add = { + value = 8 + } + } + else_if = { + limit = { + scope:actor.culture = { + cultural_acceptance = { target = scope:recipient.culture value >= 10 } + } + } + add = { + value = 5 + } + } + } +} + +vassal_claim_liege_title_interaction_highlight_value = { + value = { + add = monumental_prestige_value + if = { + limit = { + scope:actor.prestige_level > scope:recipient.prestige_level + } + subtract = { + value = medium_prestige_value + multiply = scope:actor.prestige_level + } + } + else_if = { + limit = { + scope:actor.prestige_level < scope:recipient.prestige_level + } + add = { + value = medium_prestige_value + multiply = scope:recipient.prestige_level + } + } + } +} + +script_current_military_strength = { + value = { + add = current_military_strength + } +} + +one_and_a_half_times_current_military_strength = { + value = { + add = current_military_strength + multiply = 1.5 + } +} + +twice_current_military_strength = { + value = { + add = current_military_strength + multiply = 2 + } +} + +fifty_percent_more_of_current_military_strength = { + value = { + add = current_military_strength + multiply = 1.5 + } +} + +eighty_percent_of_current_military_strength = { + value = { + add = current_military_strength + multiply = 0.8 + } +} + +a_third_of_current_military_strength = { + value = { + add = current_military_strength + multiply = 0.3 + } +} + +forty_percent_of_current_military_strength = { + value = { + add = current_military_strength + multiply = 0.4 + } +} + +fifty_percent_of_current_military_strength = { + value = { + add = current_military_strength + multiply = 0.5 + } +} + +eighty_percent_of_max_military_strength = { + value = { + add = max_military_strength + multiply = 0.8 + } +} + +fifty_percent_of_max_military_strength = { + value = { + add = max_military_strength + multiply = 0.5 + } +} + +twenty_percent_of_max_military_strength = { + value = { + add = max_military_strength + multiply = 0.2 + } +} + +designate_heir_cost = 1000 +designate_heir_admin_prestige_cost = 500 +designate_heir_admin_influence_cost = 150 +designate_heir_laamp_prestige_cost = 150 + +marry_close_family_tiers_acceptance_value = { + value = 0 + + scope:secondary_actor = { + save_temporary_scope_as = tier_comparison_first + every_close_family_member = { + even_if_dead = yes + if = { + limit = { + highest_held_title_tier > scope:tier_comparison_first.highest_held_title_tier + } + + save_temporary_scope_as = tier_comparison_first + } + } + } + + scope:secondary_recipient = { + save_temporary_scope_as = tier_comparison_second + every_close_family_member = { + even_if_dead = yes + if = { + limit = { + highest_held_title_tier > scope:tier_comparison_second.highest_held_title_tier + } + + save_temporary_scope_as = tier_comparison_second + } + } + } + + add = scope:tier_comparison_first.highest_held_title_tier + subtract = scope:tier_comparison_second.highest_held_title_tier + + if = { + limit = { + scope:recipient = { is_close_family_of = scope:secondary_recipient } + } + + multiply = 30 + } + else = { + multiply = 20 + } +} + +elope_close_family_tiers_acceptance_value = { + value = 0 + + scope:actor = { + save_temporary_scope_as = tier_comparison_first + every_close_family_member = { + even_if_dead = yes + if = { + limit = { + highest_held_title_tier > scope:tier_comparison_first.highest_held_title_tier + } + + save_temporary_scope_as = tier_comparison_first + } + } + } + + scope:recipient = { + save_temporary_scope_as = tier_comparison_second + every_close_family_member = { + even_if_dead = yes + if = { + limit = { + highest_held_title_tier > scope:tier_comparison_second.highest_held_title_tier + } + + save_temporary_scope_as = tier_comparison_second + } + } + } + + add = scope:tier_comparison_first.highest_held_title_tier + subtract = scope:tier_comparison_second.highest_held_title_tier + multiply = 25 +} + diff --git a/common/script_values/00_law_values.txt b/common/script_values/00_law_values.txt new file mode 100644 index 00000000..c3b76377 --- /dev/null +++ b/common/script_values/00_law_values.txt @@ -0,0 +1,615 @@ +############## +# LAW VALUES # +############## + +# Scaling value used to calculate realm law cost changes. +subrealm_size_modifier = { + every_sub_realm_county = { + add = 10 + } + max = 900 + + if = { + limit = { + culture = { has_cultural_parameter = cheaper_to_change_laws } + } + multiply = 0.5 + } +} + +# Learning: Base Law Cost Reduction +learning_law_cost_modifier = { + value = 0 + subtract = learning + add = 8 + divide = 50 + min = -0.5 +} + +#Faith: The modifier used to calculate the Legalism modifier if the character's faith has Legalism +legalism_law_cost_modifier = { + value = 0 + add = num_sinful_traits + subtract = num_virtuous_traits + divide = 10 + min = -0.3 +} + +#Faith: Religious Law +religious_legal_pronouncements_modifier = -0.1 + +#Faith: Natural Primitivism +natural_primitivism_modifier = 1.5 + +#Crown Authority Change +increase_crown_authority_prestige_base = 100 + +increase_crown_authority_prestige_cost = { + add = { + desc = "BASE_VALUE" + value = increase_crown_authority_prestige_base + format = "BASE_VALUE_FORMAT" + } + + # Realm Size Penalty: +10 Prestige cost per county controlled by you(r vassals) + if = { + limit = { + NOT = { + culture = { has_cultural_parameter = cheaper_to_change_laws } + } + } + add = { + desc = "realm_size" + format = "BREAKDOWN_FORMAT_REALM_SIZE_PRESTIGE_COST" + value = subrealm_size_modifier + } + } + if = { #Reduced penalty from Tradition (for tooltip) + limit = { + culture = { has_cultural_parameter = cheaper_to_change_laws } + } + add = { + desc = "realm_size" + format = "TRADITION_BREAKDOWN_LAW_REALM_SIZE_COST" + value = subrealm_size_modifier + } + } + + # Learning Modifier (2% more expensive for each skill point below 8 Learning) + if = { + limit = { + learning < 8 + } + add = { + desc = "poor_learning_law_cost_tooltip" + value = { + add = increase_crown_authority_prestige_base + add = subrealm_size_modifier + } + multiply = learning_law_cost_modifier + } + } + else_if = { # (2% less expensive for each skill point below 8 Learning) + limit = { + learning > 8 + } + add = { + desc = "learning_law_cost_tooltip" + value = { + add = increase_crown_authority_prestige_base + add = subrealm_size_modifier + } + multiply = learning_law_cost_modifier + } + } + + # Tenet Modifiers + if = { + limit = { + faith = { + has_doctrine_parameter = legalism_modified_law_costs + } + } + add = { + desc = "rite_legalism_law_cost_tooltip" + value = { + add = increase_crown_authority_prestige_base + add = subrealm_size_modifier + } + multiply = legalism_law_cost_modifier + } + } + if = { + limit = { + faith = { + has_doctrine_parameter = natural_primitivism_law_cost_increase + } + } + multiply = { + desc = "rite_primitivism_law_cost_tooltip" + value = natural_primitivism_modifier + } + } + if = { + limit = { + is_independent_ruler = no + vassal_contract_has_flag = locked_to_partition + } + multiply = { + desc = "succession_rights_forced_partition" + value = 1.25 # succession_rights_contract_law_cost = 0.25 + } + } + if = { + limit = { + faith = { + has_doctrine_parameter = religious_legal_pronouncements_law_cost_reduction + } + } + multiply = { + desc = "rite_pronouncements_law_cost_tooltip" + value = 0.9 # religious_legal_pronouncements_modifier = -0.1 + } + } + + # Apply All-Things cooldown breaker multiplier. + if = { + limit = { + has_variable = crown_authority_cooldown + culture = { has_innovation = innovation_all_things } + } + # If the tally exists, multiply by that. + if = { + limit = { has_variable = authority_cooldown_break_tally } + multiply = { + desc = "breaking_authority_cooldown" + value = var:authority_cooldown_break_tally + } + } + # Otherwise, multiply by the stock tally base. + else = { + multiply = { + desc = "breaking_authority_cooldown" + value = authority_cooldown_breaker_value + } + } + } + + # Character Modifier Bonuses + if = { + limit = { has_character_modifier = yearly_benevolent_forgiveness_modifier } + multiply = { + desc = "character_modifiers_law_cost_tooltip" + value = 0.9 # yearly_benevolent_forgiveness_modifier = -10% + } + } + + # Character Modifier Maluses + if = { + limit = { has_character_modifier = vassal_distrust_modifier } + multiply = { + desc = "character_modifiers_law_cost_tooltip" + value = 1.1 # vassal_distrust_modifier = +10% + } + } +} + +#Tribal Authority Change +increase_tribal_authority_prestige_base = 200 + +increase_tribal_authority_prestige_cost = { + add = { + desc = "BASE_VALUE" + value = increase_tribal_authority_prestige_base + format = "BASE_VALUE_FORMAT" + } + # +10 Prestige cost per county controlled by you(r vassals) + add = { + desc = "realm_size" + format = "BREAKDOWN_FORMAT_REALM_SIZE_PRESTIGE_COST" + value = subrealm_size_modifier + } + + # Learning Modifier (2% more expensive for each skill point below 8 Learning) + if = { + limit = { + learning < 8 + } + add = { + desc = "poor_learning_law_cost_tooltip" + value = { + add = increase_crown_authority_prestige_base + add = subrealm_size_modifier + } + multiply = learning_law_cost_modifier + } + } + else_if = { # (2% less expensive for each skill point below 8 Learning) + limit = { + learning > 8 + } + add = { + desc = "learning_law_cost_tooltip" + value = { + add = increase_crown_authority_prestige_base + add = subrealm_size_modifier + } + multiply = learning_law_cost_modifier + } + } + + # Tenet Modifiers + if = { + limit = { + faith = { + has_doctrine_parameter = legalism_modified_law_costs + } + } + add = { + desc = "rite_legalism_law_cost_tooltip" + value = { + add = increase_crown_authority_prestige_base + add = subrealm_size_modifier + } + multiply = legalism_law_cost_modifier + } + } + if = { + limit = { + faith = { + has_doctrine_parameter = natural_primitivism_law_cost_increase + } + } + add = { + desc = "rite_primitivism_law_cost_tooltip" + value = natural_primitivism_modifier + } + } + if = { + limit = { + faith = { + has_doctrine_parameter = religious_legal_pronouncements_law_cost_reduction + } + } + multiply = { + desc = "rite_pronouncements_law_cost_tooltip" + value = 0.9 # religious_legal_pronouncements_modifier = -0.1 + } + } + + # Apply All-Things cooldown breaker multiplier. + if = { + limit = { + has_variable = tribal_authority_cooldown + culture = { has_innovation = innovation_all_things } + } + # If the tally exists, multiply by that. + if = { + limit = { has_variable = authority_cooldown_break_tally } + multiply = { + desc = "breaking_authority_cooldown" + value = var:authority_cooldown_break_tally + } + } + # Otherwise, multiply by the stock tally base. + else = { + multiply = { + desc = "breaking_authority_cooldown" + value = authority_cooldown_breaker_value + } + } + } + + # Character Modifier Bonuses + if = { + limit = { has_character_modifier = yearly_benevolent_forgiveness_modifier } + multiply = { + desc = "character_modifiers_law_cost_tooltip" + value = 0.9 # yearly_benevolent_forgiveness_modifier = -10% + } + } + + # Character Modifier Maluses + if = { + limit = { has_character_modifier = vassal_distrust_modifier } + multiply = { + desc = "character_modifiers_law_cost_tooltip" + value = 1.1 # vassal_distrust_modifier = +10% + } + } +} + +#Succession Law Change +change_succession_law_prestige_base = 500 +@title_succession_law_mult = 3 #How many times more expensive is it to add custom title succession than change your realm succession? + +change_succession_law_prestige_cost = { + add = { + desc = "BASE_VALUE" + value = change_succession_law_prestige_base + format = "BASE_VALUE_FORMAT" + } + #Clans pay more + if = { + limit = { + government_has_flag = government_is_clan + } + add = { + desc = "clan_government_cost_tooltip" + value = change_succession_law_prestige_base + multiply = 4 + } + } + #Calculate the Legalism modifier if relevant + if = { + limit = { + faith = { + has_doctrine_parameter = legalism_modified_law_costs + } + } + add = { + desc = "rite_legalism_law_cost_tooltip" + value = change_succession_law_prestige_base + multiply = legalism_law_cost_modifier + } + } + if = { + limit = { + faith = { + has_doctrine_parameter = natural_primitivism_law_cost_increase + } + } + add = { + desc = "rite_primitivism_law_cost_tooltip" + value = natural_primitivism_modifier + } + } + if = { + limit = { + is_independent_ruler = no + vassal_contract_has_flag = locked_to_partition + } + multiply = { + desc = "succession_rights_forced_partition" + value = 1.25 # succession_rights_contract_law_cost = 0.25 + } + } + if = { + limit = { + faith = { + has_doctrine_parameter = religious_legal_pronouncements_law_cost_reduction + } + } + multiply = { + desc = "rite_pronouncements_law_cost_tooltip" + value = 0.9 # religious_legal_pronouncements_modifier = -0.1 + } + } +} + +change_title_succession_law_prestige_cost = { + add = { + desc = "BASE_VALUE" + value = change_succession_law_prestige_base + multiply = @title_succession_law_mult + } + #Calculate the Legalism modifier if relevant + if = { + limit = { + faith = { + has_doctrine_parameter = legalism_modified_law_costs + } + } + add = { + desc = "rite_legalism_law_cost_tooltip" + value = change_succession_law_prestige_base + multiply = legalism_law_cost_modifier + multiply = @title_succession_law_mult + } + } + if = { + limit = { + faith = { + has_doctrine_parameter = natural_primitivism_law_cost_increase + } + } + add = { + desc = "rite_primitivism_law_cost_tooltip" + value = natural_primitivism_modifier + } + } + if = { + limit = { + is_independent_ruler = no + vassal_contract_has_flag = locked_to_partition + } + multiply = { + desc = "succession_rights_forced_partition" + value = 1.25 # succession_rights_contract_law_cost = 0.25 + } + } + if = { + limit = { + faith = { + has_doctrine_parameter = religious_legal_pronouncements_law_cost_reduction + } + } + multiply = { + desc = "rite_pronouncements_law_cost_tooltip" + value = 0.9 # religious_legal_pronouncements_modifier = -0.1 + } + } +} + +@hre_title_succession_law_mult = 20 +change_hre_title_succession_law_prestige_cost = { + add = { + desc = "BASE_VALUE" + value = change_succession_law_prestige_base + multiply = @hre_title_succession_law_mult + } + #Calculate the Legalism modifier if relevant + if = { + limit = { + faith = { + has_doctrine_parameter = legalism_modified_law_costs + } + } + add = { + desc = "rite_legalism_law_cost_tooltip" + value = change_succession_law_prestige_base + multiply = legalism_law_cost_modifier + multiply = @hre_title_succession_law_mult + } + } + if = { + limit = { + faith = { + has_doctrine_parameter = natural_primitivism_law_cost_increase + } + } + add = { + desc = "rite_primitivism_law_cost_tooltip" + value = natural_primitivism_modifier + } + } + if = { + limit = { + faith = { + has_doctrine_parameter = religious_legal_pronouncements_law_cost_reduction + } + } + multiply = { + desc = "rite_pronouncements_law_cost_tooltip" + value = 0.9 # religious_legal_pronouncements_modifier = -0.1 + } + } +} + +admin_law_prestige_base_cost = 200 +admin_law_realm_size_cost = { + value = realm_size + max = admin_law_prestige_base_cost # Realm size can double the cost + if = { + limit = { + culture = { has_cultural_parameter = cheaper_to_change_laws } + } + multiply = 0.5 + } +} +admin_law_prestige_cost = { + add = { + desc = "BASE_VALUE" + value = admin_law_prestige_base_cost + format = "BASE_VALUE_FORMAT" + } + + # Realm Size Penalty: +10 Prestige cost per county controlled by you(r vassals) + if = { + limit = { + NOT = { + culture = { has_cultural_parameter = cheaper_to_change_laws } + } + } + add = { + desc = "realm_size" + format = "BREAKDOWN_FORMAT_REALM_SIZE_PRESTIGE_COST" + value = admin_law_realm_size_cost + } + } + if = { #Reduced penalty from Tradition (for tooltip) + limit = { + culture = { has_cultural_parameter = cheaper_to_change_laws } + } + add = { + desc = "realm_size" + format = "TRADITION_BREAKDOWN_LAW_REALM_SIZE_COST" + value = admin_law_realm_size_cost + } + } + + # Learning Modifier (2% more expensive for each skill point below 8 Learning) + if = { + limit = { + learning < 8 + } + add = { + desc = "poor_learning_law_cost_tooltip" + value = { + add = admin_law_prestige_base_cost + add = admin_law_realm_size_cost + } + multiply = learning_law_cost_modifier + } + } + else_if = { # (2% less expensive for each skill point below 8 Learning) + limit = { + learning > 8 + } + add = { + desc = "learning_law_cost_tooltip" + value = { + add = admin_law_prestige_base_cost + add = admin_law_realm_size_cost + } + multiply = learning_law_cost_modifier + } + } + + # Tenet Modifiers + if = { + limit = { + faith = { + has_doctrine_parameter = legalism_modified_law_costs + } + } + add = { + desc = "rite_legalism_law_cost_tooltip" + value = { + add = admin_law_prestige_base_cost + add = admin_law_realm_size_cost + } + multiply = legalism_law_cost_modifier + } + } + if = { + limit = { + faith = { + has_doctrine_parameter = natural_primitivism_law_cost_increase + } + } + multiply = { + desc = "rite_primitivism_law_cost_tooltip" + value = natural_primitivism_modifier + } + } + if = { + limit = { + faith = { + has_doctrine_parameter = religious_legal_pronouncements_law_cost_reduction + } + } + multiply = { + desc = "rite_pronouncements_law_cost_tooltip" + value = 0.9 # religious_legal_pronouncements_modifier = -0.1 + } + } + + # Character Modifier Bonuses + if = { + limit = { has_character_modifier = yearly_benevolent_forgiveness_modifier } + multiply = { + desc = "character_modifiers_law_cost_tooltip" + value = 0.9 # yearly_benevolent_forgiveness_modifier = -10% + } + } + + # Character Modifier Maluses + if = { + limit = { has_character_modifier = vassal_distrust_modifier } + multiply = { + desc = "character_modifiers_law_cost_tooltip" + value = 1.1 # vassal_distrust_modifier = +10% + } + } +} diff --git a/common/script_values/00_legitimacy_values.txt b/common/script_values/00_legitimacy_values.txt new file mode 100644 index 00000000..f7a921a1 --- /dev/null +++ b/common/script_values/00_legitimacy_values.txt @@ -0,0 +1,1069 @@ +###################### +# Legitimacy +###################### + +# Tier 1-4 +legitimacy_title_tier_value = { + # County = 1 + # Duchy = 2 + # Kingdom = 3 + # Empire = 4 + value = highest_held_title_tier + subtract = 1 + min = 1 +} + +# Era 1-4 +legitimacy_era_value = { + # Tribal = 1 + # Early = 2 + # High = 3 + # Late = 4 + value = 1 + culture ?= { + if = { + limit = { has_cultural_era_or_later = culture_era_early_medieval } + add = 1 + } + if = { + limit = { has_cultural_era_or_later = culture_era_high_medieval } + add = 1 + } + if = { + limit = { has_cultural_era_or_later = culture_era_late_medieval } + add = 1 + } + } + min = 1 +} + +# Combined Era + Tier 1-8 +legitimacy_title_era_value = { + value = 0 + add = legitimacy_era_value # 1-4 + add = legitimacy_title_tier_value # 1-4 + min = 2 # 1 per era, 1 per title +} + +# Tier Values +# These must be kept as simple as possible for performance's sake + +legitimacy_level_1 = 0 + +# Gap of at least 60 +legitimacy_level_2 = { # 60-240 + value = 30 + multiply = legitimacy_title_era_value +} + +# Gap of at least 80 +legitimacy_level_3 = { # 140-560 + value = 70 + multiply = legitimacy_title_era_value +} + +# Gap of at least 100 +legitimacy_level_4 = { # 240-960 + value = 120 + multiply = legitimacy_title_era_value +} + +# Gap of at least 160 +legitimacy_level_5 = { # 400-1600 + value = 200 + multiply = legitimacy_title_era_value +} + +# Gap of at least 200 +legitimacy_level_6 = { # 600-2400 + value = 300 + multiply = legitimacy_title_era_value +} + +legitimacy_max = { # 690-2760 + value = legitimacy_level_6 + multiply = 1.15 + round_to = 100 +} + +### GAIN/LOSS VALUES + +miniscule_legitimacy_gain = 20 +minor_legitimacy_gain = 50 +medium_legitimacy_gain = 100 +major_legitimacy_gain = 200 +massive_legitimacy_gain = 300 + +miniscule_legitimacy_loss = { + value = 0 + subtract = miniscule_legitimacy_gain +} +minor_legitimacy_loss = { + value = 0 + subtract = minor_legitimacy_gain +} +medium_legitimacy_loss = { + value = 0 + subtract = medium_legitimacy_gain +} +major_legitimacy_loss = { + value = 0 + subtract = major_legitimacy_gain +} +massive_legitimacy_loss = { + value = 0 + subtract = massive_legitimacy_gain +} + +### BASE CALCULATION VALUES + +# COURT GRANDEUR +base_legitimacy_per_court_grandeur_level_value = 30 +# DYNASTY RENOWN +base_legitimacy_per_dynasty_prestige_level_value = 50 +# DYNASTY PERKS +base_legitimacy_per_legitimacy_track_perk_value = 50 +# DYNASTY OF PREDECESSOR +base_legitimacy_dynasty_of_previous_value = 100 +# RELATION TO PREDECESSOR +succession_legitimacy_ancestor_per_tier_value = 50 +base_legitimacy_predecessor_primary_heir_value = 30 +base_legitimacy_predecessor_child_value = 25 +base_legitimacy_predecessor_close_family_value = 20 +base_legitimacy_predecessor_spouse_value = 15 +base_legitimacy_predecessor_extended_family_value = 10 +# SEX +base_legitimacy_sidelined_sex_value = -15 +# BASTARDRY +base_legitimacy_bastardry_high_value = -50 +base_legitimacy_bastardry_medium_value = -25 +base_legitimacy_bastardry_low_value = -10 +# YEARS AS RULER +base_legitimacy_per_year_as_ruler_value = 20 +# SPECIAL TRAITS +base_legitimacy_per_special_traits_value = 50 + +# Base legitimacy calculation - used for game start and in code +# root - ruler that gets legitimacy +base_legitimacy_value = { # Split into separate values for easy debugging/visibility + value = 0 + + # TIER + add = base_legitimacy_tier_value + + # COURT GRANDEUR + add = base_legitimacy_court_grandeur_value + + # DYNASTY RENOWN + add = base_legitimacy_dynasty_prestige_level_value + + # LEGITIMACY BLOODLINE DYNASTY PERKS + add = base_legitimacy_track_perks_value + + # COUNTY OPINION - derived from average of held counties + add = base_legitimacy_county_opinion_value + + # PREVIOUS HOLDER DYNASTY + add = base_legitimacy_dynasty_of_predecessor_value + + # PREVIOUS HOLDER CHILD + add = base_legitimacy_relation_to_predecessor_value + + # SIDELINED SEX + add = base_legitimacy_sex_value + + # BASTARDRY + add = base_legitimacy_bastardry_value + + # YEARS AS RULER - bonus for startup rulers + add = base_legitimacy_years_as_ruler_value + + # SPECIAL TRAITS + add = base_legitimacy_special_traits_value + + # DIPLOMACY SKILLS + add = base_legitimacy_diplomacy_value + + # ADMINISTRATIVE + if = { + limit = { + government_allows = administrative + } + multiply = 0.75 # To reduce the overall base values + add = base_legitimacy_admin_value # And add anything admin specific + } + + min = 100 # No one starts with Level 0 + round = yes +} + +# SUCESSION LEGITIMACY CALCULATION - USED AS THE INITIAL LEGITIMACY OF NON GAME START CHARACTERS and in code +# root - ruler that gets legitimacy +succession_legitimacy_value = { # Split into separate values for easy debugging/visibility + value = 0 + + # TIER + add = base_legitimacy_tier_value + + # COURT GRANDEUR + add = base_legitimacy_court_grandeur_value + + # DYNASTY RENOWN - new value to avoid Splendor bloating + add = succession_legitimacy_dynasty_prestige_level_value + + # LEGITIMACY BLOODLINE DYNASTY PERKS + add = base_legitimacy_track_perks_value + + # COUNTY OPINION - derived from average of held counties + add = base_legitimacy_county_opinion_value + + # PREVIOUS HOLDER DYNASTY + add = base_legitimacy_dynasty_of_predecessor_value + + # WHO WAS YOUR PARENT + add = succession_legitimacy_ancestor_tier_value + + # PREVIOUS HOLDER CHILD + add = base_legitimacy_relation_to_predecessor_value + + # SIDELINED SEX + add = base_legitimacy_sex_value + + # BASTARDRY + add = base_legitimacy_bastardry_value + + # YEARS AS RULER - bonus for startup rulers + add = base_legitimacy_years_as_ruler_value + + # SPECIAL TRAITS + add = base_legitimacy_special_traits_value + + # DIPLOMACY SKILLS + add = base_legitimacy_diplomacy_value + + # ADMINISTRATIVE + if = { + limit = { + government_allows = administrative + } + multiply = 0.75 # To reduce the overall base values + add = base_legitimacy_admin_value # And add anything admin specific + } + + min = 0 + round = yes +} + +# TIER +base_legitimacy_tier_value = { + value = 0 + if = { + limit = { highest_held_title_tier = tier_county } + add = 0 + } + else_if = { + limit = { highest_held_title_tier = tier_duchy } + add = 50 + } + else_if = { + limit = { highest_held_title_tier = tier_kingdom } + add = 150 + } + else_if = { + limit = { highest_held_title_tier = tier_empire } + add = 400 + } +} + +# COURT GRANDEUR +base_legitimacy_court_grandeur_value = { + value = 0 + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + if = { + limit = { + court_grandeur_current_level >= 9_levels_above_expected_level #you meet expectations + } + add = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 3 + } + } + else_if = { + limit = { + court_grandeur_current_level >= 7_levels_above_expected_level + } + add = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 2 + } + } + else_if = { + limit = { + court_grandeur_current_level >= 5_levels_above_expected_level + } + add = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 1.5 + } + } + else_if = { + limit = { + court_grandeur_current_level >= 3_levels_above_expected_level + } + add = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 1.25 + } + } + else_if = { + limit = { + court_grandeur_current_level >= 1_levels_above_expected_level + } + add = { + value = base_legitimacy_per_court_grandeur_level_value + } + } + else_if = { + limit = { + court_grandeur_current_level <= 1_levels_below_expected_level + } + subtract = base_legitimacy_per_court_grandeur_level_value + } + else_if = { + limit = { + court_grandeur_current_level <= 3_levels_below_expected_level + } + subtract = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 1.25 + } + } + else_if = { + limit = { + court_grandeur_current_level <= 5_levels_below_expected_level + } + subtract = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 1.5 + } + } + else_if = { + limit = { + court_grandeur_current_level <= 7_levels_below_expected_level + } + subtract = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 2 + } + } + else_if = { + limit = { + court_grandeur_current_level <= 9_levels_below_expected_level + } + subtract = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 3 + } + } + } +} + +# DYNASTY RENOWN +base_legitimacy_dynasty_prestige_level_value = { + value = 0 + if = { + limit = { + highest_held_title_tier = tier_county + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + } + } + else_if = { + limit = { + highest_held_title_tier = tier_duchy + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 1.5 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 2 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_empire + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 2.25 + } + } + if = { # We lower everything if you're in 867 + limit = { + culture ?= { NOT = { has_cultural_era_or_later = culture_era_early_medieval } } + } + multiply = 0.5 + } +} + +succession_legitimacy_dynasty_prestige_level_value = { + value = 0 + if = { + limit = { + highest_held_title_tier = tier_county + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 0.25 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_duchy + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 0.5 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 0.75 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_empire + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + } + } + if = { # We lower everything if you're in 867 + limit = { + culture ?= { NOT = { has_cultural_era_or_later = culture_era_early_medieval } } + } + multiply = 0.5 + } +} + +# LEGITIMACY BLOODLINE DYNASTY PERKS +base_legitimacy_track_perks_value = { + value = 0 + if = { + limit = { dynasty.ce1_legitimacy_legacy_track_perks >= 1 } + add = { + value = base_legitimacy_per_legitimacy_track_perk_value + multiply = dynasty.ce1_legitimacy_legacy_track_perks + } + } +} + +# COUNTY OPINION +base_legitimacy_county_opinion_value = { + value = 0 + if = { # Average of popular opinion in all held counties divided 4 (max 25) + limit = { + any_held_title = { tier = tier_county } + } + every_held_title = { + limit = { tier = tier_county } + add = { + value = county_opinion + multiply = 2 + } + } + divide = base_legitimacy_county_opinion_county_count_value + divide = 4 + ceiling = yes + } +} + +base_legitimacy_county_opinion_county_count_value = { + value = 0 + if = { + limit = { + any_held_county = { tier = tier_county } + } + every_held_title = { + limit = { tier = tier_county } + add = 1 + } + } +} + +# PREDECESSOR DYNASTY +base_legitimacy_dynasty_of_predecessor_value = { + value = 0 + if = { + limit = { primary_title.previous_holder.dynasty ?= dynasty } + if = { + limit = { + highest_held_title_tier = tier_county + } + add = base_legitimacy_dynasty_of_previous_value + } + else_if = { + limit = { + highest_held_title_tier = tier_duchy + } + add = { + value = base_legitimacy_dynasty_of_previous_value + multiply = 1.5 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + add = { + value = base_legitimacy_dynasty_of_previous_value + multiply = 2 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_empire + } + add = { + value = base_legitimacy_dynasty_of_previous_value + multiply = 2.25 + } + } + # How many previous holders were of your same dynasty? + primary_title = { + every_past_holder = { + limit = { + dynasty ?= dynasty + } + add = { + value = base_legitimacy_dynasty_of_previous_value + multiply = 0.05 + } + } + } + if = { # We lower everything if you're in 867 + limit = { + culture ?= { NOT = { has_cultural_era_or_later = culture_era_early_medieval } } + } + multiply = 0.5 + } + } +} + +# SUCCESSION - WHO WAS YOUR DAD/MOM +succession_legitimacy_ancestor_tier_value = { + value = 0 + if = { + limit = { + any_parent = { + is_ruler = yes + highest_held_title_tier = tier_empire + } + } + add = { + value = succession_legitimacy_ancestor_per_tier_value + multiply = 3 + } + } + else_if = { + limit = { + any_parent = { + is_ruler = yes + highest_held_title_tier = tier_kingdom + } + } + add = { + value = succession_legitimacy_ancestor_per_tier_value + multiply = 2 + } + } + else_if = { + limit = { + any_parent = { + is_ruler = yes + highest_held_title_tier = tier_duchy + } + } + add = { + value = succession_legitimacy_ancestor_per_tier_value + multiply = 1.5 + } + } + else_if = { + limit = { + any_parent = { + is_ruler = yes + highest_held_title_tier = tier_county + } + } + add = succession_legitimacy_ancestor_per_tier_value + } + if = { # We lower everything if you're in 867 + limit = { + culture ?= { NOT = { has_cultural_era_or_later = culture_era_early_medieval } } + } + multiply = 0.5 + } +} + + +# RELATION TO PREDECESSOR +base_legitimacy_relation_to_predecessor_value = { + value = 0 + if = { + limit = { exists = primary_title.previous_holder } + if = { + limit = { is_primary_heir_of = primary_title.previous_holder } + if = { + limit = { + highest_held_title_tier = tier_county + } + add = base_legitimacy_predecessor_primary_heir_value + } + else_if = { + limit = { + highest_held_title_tier = tier_duchy + } + add = { + value = base_legitimacy_predecessor_primary_heir_value + multiply = 1.5 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + add = { + value = base_legitimacy_predecessor_primary_heir_value + multiply = 2 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_empire + } + add = { + value = base_legitimacy_predecessor_primary_heir_value + multiply = 2.25 + } + } + if = { # We lower everything if you're in 867 + limit = { + culture ?= { NOT = { has_cultural_era_or_later = culture_era_early_medieval } } + } + multiply = 0.5 + } + } + if = { + limit = { is_child_of = primary_title.previous_holder } + add = base_legitimacy_predecessor_child_value + } + else_if = { + limit = { is_close_family_of = primary_title.previous_holder } + add = base_legitimacy_predecessor_close_family_value + } + else_if = { + limit = { is_spouse_of = primary_title.previous_holder } + add = base_legitimacy_predecessor_spouse_value + } + else_if = { + limit = { is_extended_family_of = primary_title.previous_holder } + add = base_legitimacy_predecessor_extended_family_value + } + } +} + +# SEX +base_legitimacy_sex_value = { + value = 0 + if = { + limit = { + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = no + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = no + } + } + } + add = base_legitimacy_sidelined_sex_value + } +} + +# BASTARDRY +base_legitimacy_bastardry_value = { + value = 0 + if = { + limit = { has_trait = bastard } + add = base_legitimacy_bastardry_high_value + } + if = { + limit = { has_trait = disputed_heritage } + add = base_legitimacy_bastardry_medium_value + } + if = { + limit = { + OR = { + has_trait = legitimized_bastard + has_trait = wild_oat + has_trait = child_of_concubine + } + } + add = base_legitimacy_bastardry_low_value + } +} + +# YEARS AS RULER +base_legitimacy_years_as_ruler_value = { + value = 0 + ordered_held_title = { + limit = { tier = prev.highest_held_title_tier } + order_by = title_held_years + add = title_held_years + divide = 2 + } + ceiling = yes +} + +# SPECIAL TRAITS +base_legitimacy_special_traits_value = { + value = 0 + if = { + limit = { has_trait = sayyid } + add = { + value = base_legitimacy_per_special_traits_value + multiply = 2 + } + } + if = { + limit = { has_trait = born_in_the_purple } + add = { + value = base_legitimacy_per_special_traits_value + multiply = 2 + } + } + if = { + limit = { has_trait = august } + add = { + value = base_legitimacy_per_special_traits_value + multiply = 2 + } + } + if = { + limit = { has_trait = just } + add = { + value = base_legitimacy_per_special_traits_value + multiply = 2 + } + } + if = { + limit = { num_virtuous_traits >= 1 } + add = { + value = base_legitimacy_per_special_traits_value + multiply = num_virtuous_traits + } + } + if = { + limit = { num_sinful_traits >= 1 } + add = { + value = base_legitimacy_per_special_traits_value + multiply = num_sinful_traits + multiply = -1 + } + } + if = { + limit = { + has_trait = inbred + } + add = { + value = base_legitimacy_per_special_traits_value + multiply = -2 + } + } +} + +# DIPLOMACY SKILLS +base_legitimacy_diplomacy_value = { + value = 0 + add = { + value = diplomacy + multiply = 2 #to make it matter + } +} + +# ADMINISTRATIVE +base_legitimacy_admin_value = { + value = 0 + + # Am I a dominant or powerful family? + if = { + limit = { + house ?= { is_dominant_family = yes } + } + add = { + value = house.house_power_score + multiply = 1.5 + round = yes + } + } + else_if = { + limit = { + house ?= { is_powerful_family = yes } + NOT = { primary_title.previous_holder.house ?= house } + } + add = { + value = house.house_power_score + } + } + + # Am I allied to any other powerful families? + if = { + limit = { + any_ally = { + house ?= { + house_head = prev + is_powerful_family = yes + } + top_liege = root.top_liege + } + } + every_ally = { + limit = { + house ?= { + house_head = prev + is_powerful_family = yes + } + top_liege = root.top_liege + } + add = { + value = 10 + multiply = influence_level + } + } + } + + # What is my Level of Influence? + if = { + limit = { + influence_level >= 2 + } + add = { + value = 5 + multiply = influence_level + } + } + + # What is the popular opinion in the capital? + if = { + limit = { + capital_province.county = { + county_opinion != 0 + } + } + add = { + value = capital_province.county.county_opinion + multiply = 2 + } + } + + # What level is the main building in my Estate? + if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } + } + if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } + } + add = 40 + } + else_if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } + } + add = 30 + } + else_if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } + } + add = 20 + } + else_if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } + } + add = 10 + } + } +} + +### EXPECTATIONS + +# AI Expected Legitimacy +default_ai_legitimacy_expectation = { + value = 1 + # De Jure Vassal + if = { + limit = { + scope:liege = { is_rightful_liege_of = root } + } + subtract = 1 + } + # Powerful Vassals expect more + if = { + limit = { + is_powerful_vassal_of = scope:liege + } + add = 1 + } + # How long have you been under this dynasty? + if = { + limit = { + days_since_vassal_contract_liege_dynasty_reign_start >= 18250 #50 years + } + subtract = 1 + } + if = { + limit = { + days_since_vassal_contract_liege_dynasty_reign_start >= 36500 #100 years + } + subtract = 1 + } + # Vassal Stance + if = { + limit = { was_preferred_heir = scope:liege } + subtract = 1 + } + # Relations + if = { + limit = { + scope:liege = { + OR = { + is_spouse_of = root + is_close_family_of = root + } + } + } + subtract = 1 + } + # Tier - more legitimacy required for higher tiers + if = { + limit = { + scope:liege.highest_held_title_tier >= tier_county + } + add = 1 + } + if = { + limit = { + scope:liege.highest_held_title_tier >= tier_duchy + } + add = 1 + } + if = { + limit = { + scope:liege.highest_held_title_tier >= tier_kingdom + } + add = 2 + } + if = { + limit = { + scope:liege.highest_held_title_tier >= tier_empire + } + add = 2 + } + # Era - more legitimacy required as time goes on + if = { + limit = { + scope:liege.culture = { has_cultural_era_or_later = culture_era_tribal } + } + subtract = 1 + } + else_if = { + limit = { + scope:liege.culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + add = 2 + } + else_if = { + limit = { + scope:liege.culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + add = 2 + } + min = 1 + max = 4 +} + +default_legitimacy_opinion_penalty = -10 + +### EFFECTS + +legitimacy_regent_swing_scale_multipler_value = { + value = 1 + # LEGITIMACY OF RULER AFFECTS COSTS + if = { + limit = { + scope:actor = { has_legitimacy_flag = massively_increased_swing_scales_cost } + } + multiply = 1.75 + } + if = { + limit = { + scope:actor = { has_legitimacy_flag = very_increased_swing_scales_cost } + } + multiply = 1.5 + } + if = { + limit = { + scope:actor = { has_legitimacy_flag = increased_swing_scales_cost } + } + multiply = 1.25 + } + if = { + limit = { + scope:actor = { has_legitimacy_flag = reduced_swing_scales_cost } + } + multiply = 0.85 + } + if = { + limit = { + scope:actor = { has_legitimacy_flag = very_reduced_swing_scales_cost } + } + multiply = 0.75 + } + if = { + limit = { + scope:actor = { has_legitimacy_flag = extra_reduced_swing_scales_cost } + } + multiply = 0.5 + } +} diff --git a/common/script_values/00_lifestyle_values.txt b/common/script_values/00_lifestyle_values.txt new file mode 100644 index 00000000..9223d0b3 --- /dev/null +++ b/common/script_values/00_lifestyle_values.txt @@ -0,0 +1,1025 @@ +###################### +# EXPERIENCE VALUES FOR PERK POINTS (used for add_focus_lifestyle_xp) +###################### + +# Use these values +miniscule_lifestyle_xp = 25 +minor_lifestyle_xp = 50 +medium_lifestyle_xp = 100 +major_lifestyle_xp = 300 +massive_lifestyle_xp = 500 # Half of xp needed for 1 perk point +monumental_lifestyle_xp = 1000 # Enough for 1 perk point... but why give XP instead of just awarding a full perk? + +travel_minor_lifestyle_xp = { + value = minor_lifestyle_xp + multiply = 1.5 + if = { + limit = { + has_perk = been_there_done_that_perk + } + multiply = been_there_done_that_multiplier_value + } +} + +travel_medium_xp = { + value = medium_lifestyle_xp + multiply = 1.5 + if = { + limit = { + has_perk = been_there_done_that_perk + } + multiply = been_there_done_that_multiplier_value + } +} + +travel_major_xp = { + value = major_lifestyle_xp + multiply = 1.5 + if = { + limit = { + has_perk = been_there_done_that_perk + } + multiply = been_there_done_that_multiplier_value + } +} + + + +# DEPRECATED VALUES - DO NOT USE - WILL BE DELETED! +miniscule_lifestyle_experience = 25 +minor_lifestyle_experience = 50 +medium_lifestyle_experience = 100 +major_lifestyle_experience = 300 +massive_lifestyle_experience = 500 # Half of xp needed for 1 perk point +monumental_lifestyle_experience = 1000 # Enough for 1 perk point + + + +####################################### +# LIFESTYLE PERK VALUES +####################################### + +max_perk_amount_per_lifestyle = 30 + +############### +# INTRIGUE +############### + +# Digging for Dirt +digging_for_dirt_perk_percentage = 25 +# Court of Shadows +court_of_shadows_perk_percentage = 50 +# Court of Shadows Admin Bonus +court_of_shadows_perk_admin_percentage = 10 +# Prepared for Anything +prepared_for_anything_perk_secondary_percentage = 15 +#Dark Insights perk values +dark_insights_stat_increase_chance = 50 # The chance of gaining a stat point from torturing people +dark_insights_prowess_increase_maximum = 5 # The maximum amount of Prowess that can be gained from Dark Insights +dark_insights_intrigue_increase_maximum = 5 # The maximum amount of Intrigue that can be gained from Dark Insights +home_advantage_perk_bonus = 50 # Bonus granted to seduce schemes against courtiers +smooth_operator_perk_bonus = 25 # Bonus granted to seduce schemes + + + +################ +# MARTIAL +################ + +# Courtship Perk values +courtship_court_success_chance_bonus_value = 30 +elope_court_success_chance_bonus_value = 30 + +# Promising Prospects Perk +promising_prospects_self_value = 50 +promising_prospects_other_value = 25 + +# Peacemaker Perk +peacemaker_value = 10 + +# Bellum Justum Perk +bellum_justum_discount_percentage = 50 + +# Strict Organization Perk +strict_organization_percentage = 20 + +# Hard Rule +hard_rule_military_power_increase = 20 + +################# +# DIPLOMACY +################# + +# Adaptive Traditions Perk +adaptive_traditions_perk_impact_percent = 25 + +# Accomplished Forger Perk +accomplished_forger_percentage = 75 + +# Thicker Than Water Perk +thicker_than_water_bonus = 25 + +# Flatterer Perk +flatterer_bonus = 30 + +# True Ruler Perk +true_ruler_value = 20 + +# Accomplished Forger +minor_buy_claim_prestige_value = { + value = minor_prestige_value + multiply = 5 +} +medium_buy_claim_prestige_value = { + value = minor_buy_claim_prestige_value + multiply = 2 +} +major_buy_claim_prestige_value = { + value = medium_buy_claim_prestige_value + multiply = 2 +} +massive_buy_claim_prestige_value = { + value = major_buy_claim_prestige_value + multiply = 2 +} +minor_buy_claim_prestige_loss = { + value = 0 + subtract = minor_buy_claim_prestige_value +} +medium_buy_claim_prestige_loss = { + value = 0 + subtract = medium_buy_claim_prestige_value +} +major_buy_claim_prestige_loss = { + value = 0 + subtract = major_buy_claim_prestige_value +} +massive_buy_claim_prestige_loss = { + value = 0 + subtract = massive_buy_claim_prestige_value +} + +groomed_to_rule_value = 20 + + +################ +# STEWARDSHIP +################ + +# Tax Man +tax_man_perk_percentage = 25 + +# Chains of Loyalty +chains_of_loyalty_percentage = 25 + +planned_cultivation_percentage = 20 + + +demand_payment_current_gold_value = { + value = scope:recipient.gold +} +demand_payment_gold_to_pay = { + value = scope:recipient.golden_obligation_value +} + +duty_focus_value = -20 + + +############### +# LEARNING +############### + +# Clerical Justifications +clerical_justifications_percentage = 20 + +# Learn on the Job +learn_on_the_job_percentage = 20 + +# Zealous Proselytizer +zealous_proselytizer_percentage = 25 + +# Sanctioned Loopholes +minor_buy_claim_piety_value = { + value = minor_piety_value + multiply = 5 +} +medium_buy_claim_piety_value = { + value = minor_buy_claim_piety_value + multiply = 2 +} +major_buy_claim_piety_value = { + value = medium_buy_claim_piety_value + multiply = 2 +} +massive_buy_claim_piety_value = { + value = major_buy_claim_piety_value + multiply = 2 +} +minor_buy_claim_piety_loss = { + value = 0 + subtract = minor_buy_claim_piety_value +} +medium_buy_claim_piety_loss = { + value = 0 + subtract = medium_buy_claim_piety_value +} +major_buy_claim_piety_loss = { + value = 0 + subtract = major_buy_claim_piety_value +} +massive_buy_claim_piety_loss = { + value = 0 + subtract = massive_buy_claim_piety_value +} + + + +############################################## +# EVENT VALUES +################################################ + +########################### +# LIFESTYLE FRIEND VALUES # +########################### + + + +diplomacy_foreign_affairs_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = diplomacy_lifestyle + diplomacy >= decent_skill_rating + } + } + add = diplomacy + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = diplomacy_foreign_affairs_focus } } + add = 10 + } + if = { + limit = { has_trait = gregarious } + add = 5 + } + if = { + limit = { has_council_position = councillor_chancellor } + add = 10 + } + } +} + + +diplomacy_majesty_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = diplomacy_lifestyle + diplomacy >= decent_skill_rating + } + } + add = diplomacy + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = diplomacy_majesty_focus } } + add = 10 + } + if = { + limit = { has_trait = arrogant } + add = 5 + } + add = highest_held_title_tier + add = prestige_level + } +} + +diplomacy_family_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = diplomacy_lifestyle + diplomacy >= decent_skill_rating + } + } + add = diplomacy + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = diplomacy_family_focus } } + add = 10 + } + every_child = { + limit = { + opinion = { + target = root + value >= medium_positive_opinion + } + } + add = 3 + } + add = { + value = ai_compassion + divide = high_positive_ai_value + multiply = 10 + } + } +} + +martial_strategy_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = martial_lifestyle + martial >= decent_skill_rating + } + } + add = martial + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = martial_strategy_focus } } + add = 10 + } + add = { + value = number_of_commander_traits + multiply = 3 + } + if = { + limit = { has_council_position = councillor_marshal } + add = 10 + } + } +} + +martial_authority_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = martial_lifestyle + martial >= decent_skill_rating + } + } + add = martial + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = martial_authority_focus } } + add = 10 + } + if = { + limit = { has_council_position = councillor_marshal } + add = 10 + } + } +} + +martial_chivalry_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = martial_lifestyle + prowess >= decent_skill_rating + } + } + add = prowess + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = martial_chivalry_focus } } + add = 10 + } + if = { + limit = { has_trait = lifestyle_blademaster } + add = 10 + } + if = { + limit = { has_trait = brave } + add = 5 + } + if = { + limit = { is_knight = yes } + add = 10 + } + } +} + +stewardship_wealth_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = stewardship_lifestyle + stewardship >= decent_skill_rating + } + } + add = stewardship + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = stewardship_wealth_focus } } + add = 10 + } + add = { + value = ai_greed + divide = high_positive_ai_value + multiply = 10 + } + if = { + limit = { has_council_position = councillor_steward } + add = 10 + } + } +} + +stewardship_domain_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = stewardship_lifestyle + stewardship >= decent_skill_rating + } + } + add = stewardship + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = stewardship_domain_focus } } + add = 10 + } + if = { + limit = { has_council_position = councillor_steward } + add = 10 + } + } +} + +stewardship_duty_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = stewardship_lifestyle + stewardship >= decent_skill_rating + } + } + add = stewardship + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = stewardship_duty_focus } } + add = 10 + } + if = { + limit = { has_trait = diligent } + add = 10 + } + every_vassal = { + limit = { + is_powerful_vassal = yes + opinion = { + target = root + value >= medium_positive_opinion + } + } + add = 3 + } + } +} + +intrigue_skulduggery_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = intrigue_lifestyle + intrigue >= decent_skill_rating + } + } + add = intrigue + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = intrigue_skulduggery_focus } } + add = 10 + } + if = { + limit = { has_trait = patient } + add = 5 + } + add = { + value = ai_honor + divide = high_negative_ai_value + multiply = 10 + } + } +} + +intrigue_temptation_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = intrigue_lifestyle + intrigue >= decent_skill_rating + } + } + add = intrigue + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = intrigue_temptation_focus } } + add = 10 + } + if = { + limit = { has_trait = lustful } + add = 5 + } + add = { + value = ai_honor + divide = high_negative_ai_value + multiply = 10 + } + every_relation = { + type = lover + add = 3 + } + add = { + value = attraction + divide = high_positive_attraction + multiply = 10 + } + if = { + limit = { is_deviant_trigger = yes } + add = 5 + } + if = { + limit = { + has_trait = celibate + } + add = -100 + } + if = { + limit = { + OR = { + has_trait = chaste + has_sexuality = asexual + } + } + add = -10 + } + } +} + +intrigue_intimidation_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = intrigue_lifestyle + intrigue >= decent_skill_rating + } + } + add = intrigue + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } } + add = 10 + } + if = { + limit = { has_trait = sadistic } + add = 5 + } + add = { + value = ai_compassion + divide = high_negative_ai_value + multiply = 10 + } + add = { + value = dread + divide = high_dread + multiply = 10 + } + } +} + +learning_medicine_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = learning_lifestyle + learning >= decent_skill_rating + } + } + add = learning + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = learning_medicine_focus } } + add = 10 + } + if = { + limit = { has_trait = lifestyle_physician } + add = 10 + } + if = { + limit = { has_trait = lifestyle_herbalist } + add = 10 + } + if = { + limit = { has_trait = temperate } + add = 5 + } + add = { + value = ai_compassion + divide = high_negative_ai_value + multiply = 5 + } + } +} + +learning_scholarship_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = learning_lifestyle + learning >= decent_skill_rating + } + } + add = learning + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = learning_scholarship_focus } } + add = 10 + } + if = { + limit = { has_trait = diligent } + add = 5 + } + add = { + value = ai_rationality + divide = high_positive_ai_value + multiply = 5 + } + add = { + value = ai_zeal + divide = high_negative_ai_value + multiply = 3 + } + } +} + +learning_theology_focus_friend_points = { + value = 0 + if = { + limit = { + OR = { #You must have a matching focus or a high skill + has_lifestyle = learning_lifestyle + learning >= decent_skill_rating + } + } + add = learning + subtract = low_skill_rating + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = learning_theology_focus } } + add = 10 + } + if = { + limit = { has_trait = lifestyle_mystic } + add = 10 + } + add = { + value = ai_zeal + divide = high_positive_ai_value + multiply = 5 + } + add = { + value = num_virtuous_traits + multiply = 4 + } + } +} + + + +############# +# DIPLOMACY # +############# + +# Returns a total value between 0.0 and 1.0 based on how relevant this character is to root's chosen focus. +# Irrelevant characters tend towards 0.0 and 0.1, while highly relevant ones will tend towards 0.75 and 1.0 +# Examples of highly relevant characters include a powerful vassal while in the Majesty focus, or a neighboring independent King while in the Foreign Affairs focus. +diplomacy_roots_focus_based_character_relevance_weighting = { + value = 0 + if = { + # Majesty-focused charaters prefer someone in their realm of high standing. + limit = { + root = { has_focus = diplomacy_majesty_focus } + } + if = { + limit = { # Target is my direct liege. + this = root.liege + } + add = 1.0 + } + else_if = { + limit = { # Target is one of my powerful vassals. + is_powerful_vassal_of = root + } + add = 0.70 + } + else_if = { + limit = { # Target is one of my direct vassals. + is_vassal_of = root + } + add = 0.35 + } + else_if = { + limit = { # Target is one of my courtiers. + is_courtier_of = root + } + add = 0.05 + } + } + if = { + # Family-focused characters prefer direct relations or those who are part of their dynasty. + limit = { + root = { has_focus = diplomacy_family_focus } + } + + # Family Check + if = { + limit = { + is_close_family_of = root + } + add = 0.40 + } + else_if = { + limit = { + is_extended_family_of = root + } + add = 0.25 + } + + # Consort Check + if = { + limit = { + is_spouse_of = root + } + add = 0.45 + } + else_if = { + limit = { + is_concubine_of = root + } + add = 0.05 + } + + # Dynasty Check + if = { + limit = { + house = root.house + } + add = 0.15 + } + else_if = { + limit = { + dynasty = root.dynasty + } + add = 0.05 + } + } + if = { + # Foreign Affairs-focused characters prefer those who are not in their realm. + limit = { + root = { has_focus = diplomacy_foreign_affairs_focus } + } + if = { + limit = { # Is the ruler of a completely independent realm. + is_independent_ruler = yes + } + add = 0.50 + } + else_if = { + limit = { # We are at least in different realms. + NOT = { top_liege = root.top_liege } + } + add = 0.35 + } + else_if = { + limit = { # We are at least not part of the same vassal-liege chain. + save_temporary_scope_as = this_character + NOT = { + target_is_liege_or_above = root + root = { target_is_liege_or_above = scope:this_character } + } + } + add = 0.10 + } + + # Foreign Affairs-focused characters also have a stronger preference for foreigners of an equal or higher rank! + if = { + limit = { # Same tier as us (or higher) + NOT = { top_liege = root.top_liege } + tier_difference = { + target = root + value = 0 + } + } + add = 0.25 + } + else_if = { + limit = { # Only 1 tier below us + NOT = { top_liege = root.top_liege } + tier_difference = { + target = root + value = 1 + } + } + add = 0.10 + } + + # It is a little weird for a vassal ruler to be debating an independent ruler of a higher rank, so we should avoid it where possible! + if = { + limit = { + root = { + is_independent_ruler = no + } + is_independent_ruler = yes + highest_held_title_tier > root.highest_held_title_tier + } + add = -0.50 + } + } +} + + +############################# +# LIFESTYLE TRAIT VALUES +############################# + +### Mystic +mystic_first_rank_up_threshold = 2 +mystic_second_rank_up_threshold = 3 + +small_lifestyle_random_xp_low = 5 +small_lifestyle_random_xp_mid = 20 +small_lifestyle_random_xp_high = 40 +medium_lifestyle_random_xp_low = 55 +medium_lifestyle_random_xp_high = 80 + +lifestyle_mystic_xp_gain_minor_value = { + value = { 3 5 } +} + +lifestyle_blademaster_xp_gain_minor_value = { + value = { 3 7 } +} + +negative_small_lifestyle_random_xp_low = -5 +negative_small_lifestyle_random_xp_mid = -20 +negative_small_lifestyle_random_xp_high = -40 +negative_medium_lifestyle_random_xp_low = -55 +negative_medium_lifestyle_random_xp_high = -80 + +trait_third_level_value = 60 + +################################ +# LIFESTYLE WANDERER VALUES +################################ +wanderer_current_lifestyle_monthly_bonus = { + value = 0 + if = { + limit = { + has_trait = lifestyle_traveler + } + add = 10 + } + if = { + limit = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value = 100 + } + } + add = 40 + } + else_if = { + limit = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + } + add = 20 + } +} + + +voyager_journey_planner_value = { + value = 0.8 +} + +wanderer_destination_prestige_value = { + value = 50 +} + +wanderer_finally_there_prestige_value = { + value = 10 +} + +been_there_done_that_multiplier_value = { + value = 1.3 +} + +point_of_interest_prestige_value = { + add = { + add = medium_prestige_gain + multiply = been_there_done_that_check_multiplier_value + } + add = wanderer_destination_prestige_value_with_effects +} + +point_of_interest_piety_value = { + value = medium_piety_gain + if = { + limit = { + root = { has_perk = been_there_done_that_perk } + } + multiply = been_there_done_that_multiplier_value + } +} + +wanderer_destination_prestige_value_with_effects = { + if = { + limit = { + root = { has_focus = wanderer_destination_focus } + } + add = { + add = wanderer_destination_prestige_value + multiply = been_there_done_that_check_multiplier_value + } + } + if = { + limit = { + root = { + has_perk = finally_there_perk + } + } + add = { + add = wanderer_finally_there_prestige_value + multiply = been_there_done_that_check_multiplier_value + } + } +} + +been_there_done_that_check_multiplier_value = { + value = 1 + if = { + limit = { + root = { has_perk = been_there_done_that_perk } + } + multiply = been_there_done_that_multiplier_value + } +} + +voyager_souvenirs_aplenty_script_value = { + value = { + add = location.county.development_level + subtract = root.capital_county.development_level + divide = 5 # Dividing it down, so there needs to be a noticeable difference between destination and capital to have an effect + if = { + limit = { + is_ai = yes + } + divide = 2 # Dividing it down extra much for AI, so we don't see a huge boost across the world + } + multiply = 100 # We are multiplying it, because it will be used for development progress, rather than outright development + min = 10 + max = voyager_souvenirs_aplenty_max_value + } +} + +voyager_souvenirs_aplenty_max_value = { + value = 200 +} + +# Know your land, know your people, Perk +surveyor_marriage_perk_self_value = 50 +surveyor_marriage_perk_other_value = 25 + +inspection_unfitting_ruler_value = { + value = 1 + county.holder = { + add = dread + } + desc = MODIFIER_DEFINITION_UNFITTING_RULER_DESC +} + +internal_affairs_local_corruption_value = { + value = 100 + subtract = county_control + min = 1 + max = 100 + desc = MODIFIER_DEFINITION_LOCAL_CORRUPTION_DESC +} diff --git a/common/script_values/00_men_at_arms_values.txt b/common/script_values/00_men_at_arms_values.txt new file mode 100644 index 00000000..a25fe7b7 --- /dev/null +++ b/common/script_values/00_men_at_arms_values.txt @@ -0,0 +1,703 @@ +###################### +# Men-at-Arms Values # +###################### + +######### +# Costs # +######### + +@high_maint_mult = 3 + +### Base Cost Values +@skirmisher_recruitment_cost = 45 +@skirmisher_low_maint_cost = 0.15 +@skirmisher_high_maint_cost = @[skirmisher_low_maint_cost * high_maint_mult] + +@archers_recruitment_cost = 55 +@archers_low_maint_cost = 0.2 +@archers_high_maint_cost = @[archers_low_maint_cost * high_maint_mult] + +@pikemen_recruitment_cost = 75 +@pikemen_low_maint_cost = 0.3 +@pikemen_high_maint_cost = @[pikemen_low_maint_cost * high_maint_mult] + +@heavy_infantry_recruitment_cost = 90 +@heavy_infantry_low_maint_cost = 0.4 +@heavy_infantry_high_maint_cost = @[heavy_infantry_low_maint_cost * high_maint_mult] + +@light_cavalry_recruitment_cost = 85 +@light_cavalry_low_maint_cost = 0.35 +@light_cavalry_high_maint_cost = @[light_cavalry_low_maint_cost * high_maint_mult] + +@heavy_cavalry_recruitment_cost = 200 +@heavy_cavalry_low_maint_cost = 0.7 +@heavy_cavalry_high_maint_cost = @[heavy_cavalry_low_maint_cost * high_maint_mult] + +@siege_weapons_recruitment_cost = 60 +@siege_weapons_low_maint_cost = 0.1 +@siege_weapons_high_maint_cost = @[siege_weapons_low_maint_cost * high_maint_mult] + + +### Base MAA +skirmisher_recruitment_cost = @[skirmisher_recruitment_cost] +skirmisher_low_maint_cost = @[skirmisher_low_maint_cost] +skirmisher_high_maint_cost = @[skirmisher_high_maint_cost] + +bowmen_recruitment_cost = @[archers_recruitment_cost] +bowmen_low_maint_cost = @[archers_low_maint_cost] +bowmen_high_maint_cost = @[archers_high_maint_cost] + +crossbowmen_recruitment_cost = @[archers_recruitment_cost * 1.6] +crossbowmen_low_maint_cost = @[archers_low_maint_cost * 1.5] +crossbowmen_high_maint_cost = @[archers_high_maint_cost * 1.5] + +pikemen_recruitment_cost = @[pikemen_recruitment_cost] +pikemen_low_maint_cost = @[pikemen_low_maint_cost] +pikemen_high_maint_cost = @[pikemen_high_maint_cost] + +heavy_infantry_recruitment_cost = @[heavy_infantry_recruitment_cost] +heavy_infantry_low_maint_cost = @[heavy_infantry_low_maint_cost] +heavy_infantry_high_maint_cost = @[heavy_infantry_high_maint_cost] + +light_cavalry_recruitment_cost = @[light_cavalry_recruitment_cost] +light_cavalry_low_maint_cost = @[light_cavalry_low_maint_cost] +light_cavalry_high_maint_cost = @[light_cavalry_high_maint_cost] + +heavy_cavalry_recruitment_cost = @[heavy_cavalry_recruitment_cost] +heavy_cavalry_low_maint_cost = @[heavy_cavalry_low_maint_cost] +heavy_cavalry_high_maint_cost = @[heavy_cavalry_high_maint_cost] + + +### Siege Weapons MAA +onager_recruitment_cost = @[siege_weapons_recruitment_cost] +onager_low_maint_cost = @[siege_weapons_low_maint_cost] +onager_high_maint_cost = @[siege_weapons_high_maint_cost] + +mangonel_recruitment_cost = @[siege_weapons_recruitment_cost * 1.1] +mangonel_low_maint_cost = @[siege_weapons_low_maint_cost * 1.1] +mangonel_high_maint_cost = @[siege_weapons_high_maint_cost * 1.1] + +trebuchet_recruitment_cost = @[siege_weapons_recruitment_cost * 1.3] +trebuchet_low_maint_cost = @[siege_weapons_low_maint_cost * 1.3] +trebuchet_high_maint_cost = @[siege_weapons_high_maint_cost * 1.3] + +bombard_recruitment_cost = @[siege_weapons_recruitment_cost * 1.6] +bombard_low_maint_cost = @[siege_weapons_low_maint_cost * 1.6] +bombard_high_maint_cost = @[siege_weapons_high_maint_cost * 1.6] + + +### Cultural MAA +huscarls_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.28] +huscarls_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.28] +huscarls_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.28] + +landsknecht_recruitment_cost = @[pikemen_recruitment_cost * 1.2] +landsknecht_low_maint_cost = @[pikemen_low_maint_cost * 1.2] +landsknecht_high_maint_cost = @[pikemen_high_maint_cost * 1.2] + +longbowmen_recruitment_cost = @[archers_recruitment_cost * 1.2] +longbowmen_low_maint_cost = @[archers_low_maint_cost * 1.2] +longbowmen_high_maint_cost = @[archers_high_maint_cost * 1.2] + +goedendag_recruitment_cost = @[skirmisher_recruitment_cost + 0] +goedendag_low_maint_cost = @[skirmisher_low_maint_cost + 0] +goedendag_high_maint_cost = @[skirmisher_high_maint_cost + 0] + +gendarme_recruitment_cost = @[heavy_cavalry_recruitment_cost * 1.2] +gendarme_low_maint_cost = @[heavy_cavalry_low_maint_cost * 1.2] +gendarme_high_maint_cost = @[heavy_cavalry_high_maint_cost * 1.2] + +chasseur_recruitment_cost = @[light_cavalry_recruitment_cost * 1.3] +chasseur_low_maint_cost = @[light_cavalry_low_maint_cost * 1.3] +chasseur_high_maint_cost = @[light_cavalry_high_maint_cost * 1.3] + +picchieri_recruitment_cost = @[pikemen_recruitment_cost * 1.3] +picchieri_low_maint_cost = @[pikemen_low_maint_cost * 1.3] +picchieri_high_maint_cost = @[pikemen_high_maint_cost * 1.3] + +praetorian_recruitment_cost = @[heavy_infantry_recruitment_cost * 2] +praetorian_low_maint_cost = @[heavy_infantry_low_maint_cost * 2] +praetorian_high_maint_cost = @[heavy_infantry_high_maint_cost * 2] + +caballero_recruitment_cost = @[light_cavalry_recruitment_cost + 0] +caballero_low_maint_cost = @[light_cavalry_low_maint_cost * 1.1] +caballero_high_maint_cost = @[light_cavalry_high_maint_cost * 1.1] + +mulaththamun_recruitment_cost = @[light_cavalry_recruitment_cost + 0] +mulaththamun_low_maint_cost = @[light_cavalry_low_maint_cost * 1.1] +mulaththamun_high_maint_cost = @[light_cavalry_high_maint_cost * 1.1] + +paiks_recruitment_cost = @[archers_recruitment_cost * 1.1] +paiks_low_maint_cost = @[archers_low_maint_cost * 1.1] +paiks_high_maint_cost = @[archers_high_maint_cost * 1.1] + +archers_of_the_nile_recruitment_cost = @[archers_recruitment_cost * 1.1] +archers_of_the_nile_low_maint_cost = @[archers_low_maint_cost * 1.1] +archers_of_the_nile_high_maint_cost = @[archers_high_maint_cost * 1.1] + +sahel_rider_recruitment_cost = @[light_cavalry_recruitment_cost + 5] +sahel_rider_low_maint_cost = @[light_cavalry_low_maint_cost * 1.1] +sahel_rider_high_maint_cost = @[light_cavalry_high_maint_cost * 1.1] + +cataphract_recruitment_cost = @[heavy_cavalry_recruitment_cost * 1.3] +cataphract_low_maint_cost = @[heavy_cavalry_low_maint_cost * 1.3] +cataphract_high_maint_cost = @[heavy_cavalry_high_maint_cost * 1.3] + +monaspa_recruitment_cost = @[heavy_cavalry_recruitment_cost * 1.25] +monaspa_low_maint_cost = @[heavy_cavalry_low_maint_cost * 1.25] +monaspa_high_maint_cost = @[heavy_cavalry_high_maint_cost * 1.25] + +hobelar_recruitment_cost = @[light_cavalry_recruitment_cost * 1.1] +hobelar_low_maint_cost = @[light_cavalry_low_maint_cost * 1.1] +hobelar_high_maint_cost = @[light_cavalry_high_maint_cost * 1.1] + +schiltron_recruitment_cost = @[pikemen_recruitment_cost * 1.5] +schiltron_low_maint_cost = @[pikemen_low_maint_cost * 1.5] +schiltron_high_maint_cost = @[pikemen_high_maint_cost * 1.5] + +metsanvartija_recruitment_cost = @[archers_recruitment_cost * 1.1] +metsanvartija_low_maint_cost = @[archers_low_maint_cost * 1.1] +metsanvartija_high_maint_cost = @[archers_high_maint_cost * 1.1] + +horse_archers_recruitment_cost = @[skirmisher_recruitment_cost * 3] +horse_archers_low_maint_cost = @[skirmisher_low_maint_cost * 3] +horse_archers_high_maint_cost = @[skirmisher_high_maint_cost * 3] + +ayyar_recruitment_cost = @[heavy_infantry_recruitment_cost - 15] +ayyar_low_maint_cost = @[heavy_infantry_low_maint_cost * 0.9] +ayyar_high_maint_cost = @[heavy_infantry_high_maint_cost * 0.9] + +mubarizun_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.2] +mubarizun_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.2] +mubarizun_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.2] + +druzhina_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.3] +druzhina_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.3] +druzhina_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.3] + +hussar_recruitment_cost = @[light_cavalry_recruitment_cost * 1.3] +hussar_low_maint_cost = @[light_cavalry_low_maint_cost * 1.3] +hussar_high_maint_cost = @[light_cavalry_high_maint_cost * 1.3] + +horn_warrior_recruitment_cost = @[skirmisher_recruitment_cost + 0] +horn_warrior_low_maint_cost = @[skirmisher_low_maint_cost + 0] +horn_warrior_high_maint_cost = @[skirmisher_high_maint_cost + 0] + +bush_hunter_recruitment_cost = @[archers_recruitment_cost + 0] +bush_hunter_low_maint_cost = @[archers_low_maint_cost * 1.1] +bush_hunter_high_maint_cost = @[archers_high_maint_cost * 1.1] + +shomer_recruitment_cost = @[skirmisher_recruitment_cost + 0] +shomer_low_maint_cost = @[skirmisher_low_maint_cost + 0] +shomer_high_maint_cost = @[skirmisher_high_maint_cost + 0] + +khandayat_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.2] +khandayat_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.2] +khandayat_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.2] + +garudas_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.28] +garudas_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.28] +garudas_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.28] + +mountaineer_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.2] +mountaineer_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.2] +mountaineer_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.2] + +guinea_warrior_recruitment_cost = @[skirmisher_recruitment_cost * 1.2] +guinea_warrior_low_maint_cost = @[skirmisher_low_maint_cost * 1.2] +guinea_warrior_high_maint_cost = @[skirmisher_high_maint_cost * 1.2] + +sarawit_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.2] +sarawit_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.2] +sarawit_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.2] + +abudrar_recruitment_cost = @[skirmisher_recruitment_cost * 1.8] +abudrar_low_maint_cost = @[skirmisher_low_maint_cost * 1.8] +abudrar_high_maint_cost = @[skirmisher_high_maint_cost * 1.8] + +zbrojnosh_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.1] +zbrojnosh_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.1] +zbrojnosh_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.1] + +palace_guards_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.2] +palace_guards_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.2] +palace_guards_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.2] + +chu_ko_nu_recruitment_cost = @[archers_recruitment_cost * 1.5] +chu_ko_nu_low_maint_cost = @[archers_low_maint_cost * 1.5] +chu_ko_nu_high_maint_cost = @[archers_high_maint_cost * 1.5] + +bondi_recruitment_cost = @[pikemen_recruitment_cost * 0.67] +bondi_low_maint_cost = @[pikemen_low_maint_cost * 0.67] +bondi_high_maint_cost = @[pikemen_high_maint_cost * 0.67] + +vigmen_recruitment_cost = @[archers_recruitment_cost * 1.1] +vigmen_low_maint_cost = @[archers_low_maint_cost * 1.1] +vigmen_high_maint_cost = @[archers_high_maint_cost * 1.1] + +varangian_veterans_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.67] +varangian_veterans_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.67] +varangian_veterans_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.67] + +jomsviking_pirates_recruitment_cost = @[skirmisher_recruitment_cost * 1.4] +jomsviking_pirates_low_maint_cost = @[skirmisher_low_maint_cost * 1.4] +jomsviking_pirates_high_maint_cost = @[skirmisher_high_maint_cost * 1.4] + +tawashi_recruitment_cost = @[light_cavalry_recruitment_cost * 1.1] +tawashi_low_maint_cost = @[light_cavalry_low_maint_cost * 1.1] +tawashi_high_maint_cost = @[light_cavalry_high_maint_cost * 1.1] + +ayrudzi_recruitment_cost = @[light_cavalry_recruitment_cost] +ayrudzi_low_maint_cost = @[light_cavalry_low_maint_cost] +ayrudzi_high_maint_cost = @[light_cavalry_high_maint_cost] + +conrois_recruitment_cost = @[heavy_cavalry_recruitment_cost * 0.85] +conrois_low_maint_cost = @[heavy_cavalry_low_maint_cost * 0.85] +conrois_high_maint_cost = @[heavy_cavalry_high_maint_cost * 0.85] + +akritai_recruitment_cost = @[skirmisher_recruitment_cost * 0.9] +akritai_low_maint_cost = @[skirmisher_low_maint_cost * 0.9] +akritai_high_maint_cost = @[skirmisher_high_maint_cost * 0.9] + +skoutatoi_recruitment_cost = @[pikemen_recruitment_cost * 1.1] +skoutatoi_low_maint_cost = @[pikemen_low_maint_cost * 1.1] +skoutatoi_high_maint_cost = @[pikemen_high_maint_cost * 1.1] + +ballistrai_recruitment_cost = @[archers_recruitment_cost * 1.15] +ballistrai_low_maint_cost = @[archers_low_maint_cost * 0.75] +ballistrai_high_maint_cost = @[archers_high_maint_cost * 0.75] + +asawira_recruitment_cost = 300 +asawira_low_maint_cost = 1 +asawira_high_maint_cost = 3 + +### Regional MAA +camel_rider_recruitment_cost = @[light_cavalry_recruitment_cost + 0] +camel_rider_low_maint_cost = @[light_cavalry_low_maint_cost * 0.8] +camel_rider_high_maint_cost = @[light_cavalry_high_maint_cost * 0.8] + +war_elephant_recruitment_cost = @[heavy_cavalry_recruitment_cost * 2] +war_elephant_low_maint_cost = @[heavy_cavalry_low_maint_cost * 1.2] +war_elephant_high_maint_cost = @[heavy_cavalry_high_maint_cost * 1.4] + +guanch_vaulter_recruitment_cost = @[skirmisher_recruitment_cost * 1.2] +guanch_vaulter_low_maint_cost = @[skirmisher_low_maint_cost * 1.2] +guanch_vaulter_high_maint_cost = @[skirmisher_high_maint_cost * 1.2] + +###Accolade MaA + +accolade_skirmisher_recruitment_cost = @[skirmisher_recruitment_cost * 2] +accolade_bowmen_recruitment_cost = @[archers_recruitment_cost * 2] +accolade_crossbowmen_recruitment_cost = @[archers_recruitment_cost * 1.6 * 2] +accolade_pikemen_recruitment_cost = @[pikemen_recruitment_cost * 2] +accolade_heavy_infantry_recruitment_cost = @[heavy_infantry_recruitment_cost * 2] +accolade_light_cavalry_recruitment_cost = @[light_cavalry_recruitment_cost * 2] +accolade_heavy_cavalry_recruitment_cost = @[heavy_cavalry_recruitment_cost * 2] +accolade_camel_rider_recruitment_cost = @[light_cavalry_recruitment_cost * 2] +accolade_siege_weapons_recruitment_cost = @[siege_weapons_recruitment_cost * 2] +accolade_war_elephant_recruitment_cost = @[heavy_cavalry_recruitment_cost * 4] +accolade_horse_archers_recruitment_cost = @[skirmisher_recruitment_cost * 3 * 2] + +varangian_guards_recruitment_cost = @[heavy_infantry_recruitment_cost * 0.8] +varangian_guards_low_maint_cost = @[heavy_infantry_low_maint_cost * 0.8] +varangian_guards_high_maint_cost = @[heavy_infantry_high_maint_cost * 0.8] + +handpicked_faithful_recruitment_cost = @[heavy_infantry_recruitment_cost * 0.75] +handpicked_faithful_low_maint_cost = @[heavy_infantry_low_maint_cost * 0.75] +handpicked_faithful_high_maint_cost = @[heavy_infantry_high_maint_cost * 0.75] + +############## +# AI Weights # +############## + +culture_ai_weight_skirmishers = { + value = -10 + + if = { # Cultures that favours skirmishers + limit = { + culture = { + OR = { + has_cultural_pillar = heritage_baltic + has_cultural_pillar = heritage_ugro_permian + has_cultural_pillar = heritage_balto_finnic + } + } + } + add = 20 + } + if = { # Cultures that dislike skirmishers + limit = { + culture = { + OR = { + has_cultural_pillar = heritage_central_germanic + has_cultural_pillar = heritage_frankish + has_cultural_pillar = heritage_iberian + has_cultural_pillar = heritage_latin + } + } + } + add = -60 + } + + if = { # Cultures with a special MaA of that type should avoid the base version of the unit + limit = { + culture = { + culture_has_skirmisher_maa = yes + } + } + add = -500 + } +} + +culture_ai_weight_archers = { + value = 0 + + if = { # Cultures that favours archers + limit = { + culture = { + OR = { + has_cultural_pillar = heritage_west_germanic + has_cultural_pillar = heritage_brythonic + has_cultural_pillar = heritage_east_african + has_cultural_pillar = heritage_indo_aryan + has_cultural_pillar = heritage_dravidian + has_cultural_pillar = heritage_burman + has_cultural_pillar = heritage_chinese + } + } + } + add = 40 + } + if = { # Cultures that dislike archers + limit = { + OR = { + culture = { has_cultural_pillar = heritage_central_germanic } + culture = { has_cultural_pillar = heritage_frankish } + } + } + add = -60 + } + + if = { # Cultures with a special MaA of that type should avoid the base version of the unit + limit = { + culture = { + culture_has_archer_maa = yes + } + } + add = -500 + } +} + +culture_ai_weight_heavy_infantry = { + value = 0 + + if = { # Cultures that favours heavy infantry + limit = { + culture = { + OR = { + has_cultural_pillar = heritage_central_germanic + has_cultural_pillar = heritage_north_germanic + has_cultural_pillar = heritage_west_germanic + has_cultural_pillar = heritage_east_slavic + } + } + } + add = 40 + } + + if = { # Cultures with a special MaA of that type should avoid the base version of the unit + limit = { + culture = { + culture_has_heavy_infantry_maa = yes + } + } + add = -500 + } +} + +culture_ai_weight_pikemen = { + value = 0 + + if = { # Cultures that favours spearmen + limit = { + OR = { + culture = { has_cultural_pillar = heritage_central_germanic } + culture = { has_cultural_pillar = heritage_latin } + } + } + add = 40 + } + + if = { # Cultures with a special MaA of that type should avoid the base version of the unit + limit = { + culture = { + culture_has_pikemen_maa = yes + } + } + add = -500 + } +} + +culture_ai_weight_light_cavalry = { + value = 20 + + if = { # Cultures that REALLY like light cavalry + limit = { + OR = { + culture = { has_cultural_pillar = heritage_iranian } + + # Steppe cultures + culture = { has_cultural_pillar = heritage_turkic } + culture = { has_cultural_pillar = heritage_mongolic } + } + } + add = 80 + } + if = { # Cultures that favours light cavalry + limit = { + culture = { + OR = { + has_cultural_pillar = heritage_arabic + has_cultural_pillar = heritage_iranian + has_cultural_pillar = heritage_berber + has_cultural_pillar = heritage_iberian + has_cultural_pillar = heritage_indo_aryan + } + } + } + add = 40 + } + if = { # Cultures that dislike light cavalry + limit = { + OR = { + culture = { has_cultural_pillar = heritage_central_germanic } + culture = { has_cultural_pillar = heritage_tibetan } + culture = { has_cultural_pillar = heritage_baltic } + culture = { has_cultural_pillar = heritage_burman } + culture = { has_cultural_pillar = heritage_somalian } + } + } + add = -60 + } + + if = { # Cultures with a special MaA of that type should avoid the base version of the unit + limit = { + culture = { + culture_has_light_cavalry_maa = yes + } + } + add = -500 + } + + if = { # Cultures with a preference for Camel Riders should buy those over normal light cavalry + limit = { + culture = { + has_innovation = innovation_war_camels + } + OR = { + culture = { has_cultural_pillar = heritage_arabic } + culture = { has_cultural_pillar = heritage_berber } + } + } + add = -200 + } +} + +culture_ai_weight_heavy_cavalry = { + value = 0 + + if = { # Cultures that REALLY like heavy cavalry + limit = { + OR = { + culture = { has_cultural_pillar = heritage_iranian } + + # Steppe cultures + culture = { has_cultural_pillar = heritage_turkic } + culture = { has_cultural_pillar = heritage_mongolic } + } + } + add = 80 + } + if = { # Cultures that favours heavy cavalry + limit = { + OR = { + culture = { has_cultural_pillar = heritage_central_germanic } + culture = { has_cultural_pillar = heritage_frankish } + culture = { has_cultural_pillar = heritage_indo_aryan } + } + } + add = 40 + } + if = { # Cultures that dislike heavy cavalry + limit = { + culture = { + OR = { + has_cultural_pillar = heritage_tibetan + has_cultural_pillar = heritage_baltic + has_cultural_pillar = heritage_south_slavic + has_cultural_pillar = heritage_sahelian + has_cultural_pillar = heritage_senegambian + has_cultural_pillar = heritage_west_african + has_cultural_pillar = heritage_yoruba + has_cultural_pillar = heritage_somalian + has_cultural_pillar = heritage_east_african + has_cultural_pillar = heritage_burman + } + } + } + add = -60 + } + + if = { # Cultures with a special MaA of that type should avoid the base version of the unit + limit = { + culture = { + culture_has_heavy_cavalry_maa = yes + } + } + add = -500 + } +} + +culture_ai_weight_camels = { + value = 20 + + if = { # Cultures that favours camel riders + limit = { + OR = { + culture = { has_cultural_pillar = heritage_arabic } + culture = { has_cultural_pillar = heritage_berber } + } + } + add = 80 + } +} + +culture_ai_weight_elephants = { + value = 0 + + if = { # Cultures that favours war elephants + limit = { + OR = { + culture = { has_cultural_pillar = heritage_dravidian } + culture = { has_cultural_pillar = heritage_indo_aryan } + culture = { has_cultural_pillar = heritage_burman } + } + } + add = 60 + } +} + +culture_ai_weight_vigmen = { + value = 60 + + if = { # Cultures that favours heavy infantry + limit = { + any_sub_realm_county = { is_coastal_county = yes } + } + add = 20 + } +} + +counter_synergy_ai_weight_archers = { + value = 0 + if = { + limit = { + number_maa_regiments_of_base_type = { + type = heavy_infantry + value >= 3 + } + NOT = { #no need to add more if i.e. regional or inherited maa of that type already exists + number_maa_regiments_of_base_type = { + type = archers + value >= 1 + } + } + } + add = 60 + } +} + +counter_synergy_ai_weight_pikemen = { + value = 0 + if = { + limit = { + number_maa_regiments_of_base_type = { + type = archers + value >= 3 + } + NOT = { #no need to add more if i.e. regional or inherited maa of that type already exists + number_maa_regiments_of_base_type = { + type = pikemen + value >= 1 + } + } + } + add = 60 + } +} + +counter_synergy_ai_weight_heavy_infantry = { + value = 0 + if = { + limit = { + OR = { + number_maa_regiments_of_base_type = { + type = heavy_cavalry + value >= 3 + } + number_maa_regiments_of_base_type = { + type = light_cavalry + value >= 3 + } + } + NOT = { #no need to add more if i.e. regional or inherited maa of that type already exists + number_maa_regiments_of_base_type = { + type = heavy_infantry + value >= 1 + } + } + } + add = 60 + } +} + +counter_synergy_ai_weight_light_cavalry = { + value = 0 + if = { + limit = { + number_maa_regiments_of_base_type = { + type = skirmishers + value >= 3 + } + NOT = { #no need to add more if i.e. regional or inherited maa of that type already exists + number_maa_regiments_of_base_type = { + type = light_cavalry + value >= 1 + } + } + } + add = 60 + } +} + +################### +# Provisions Costs # +################### + +#TODO_CD_EP3; these can't actually be used due to some kind of load order issue: they're synced in each file instead. We should file a bug and see if Code can fix. +provisions_cost_infantry_cheap = 3 +provisions_cost_infantry_moderate = 7 +provisions_cost_infantry_expensive = 12 +provisions_cost_infantry_bankrupting = 15 + +provisions_cost_cavalry_cheap = 7 +provisions_cost_cavalry_moderate = 15 +provisions_cost_cavalry_expensive = 21 +provisions_cost_cavalry_bankrupting = 30 + +# Generally used for siege weapons & adjacent similar stuff. +## Cheaper than cavalry, as they need less support infrastructure than mounted troops, but more expensive than infantry — tools may not eat but heavy supplies still need transporting, proofing against the elements, etc, whilst hard-to-find engineers may not put up with common grub. +provisions_cost_special_cheap = 6 +provisions_cost_special_moderate = 12 +provisions_cost_special_expensive = 18 +provisions_cost_special_bankrupting = 24 diff --git a/common/script_values/00_mongol_values.txt b/common/script_values/00_mongol_values.txt new file mode 100644 index 00000000..dee4947c --- /dev/null +++ b/common/script_values/00_mongol_values.txt @@ -0,0 +1,225 @@ +####################### +# MONGOL VALUES +####################### +# Conquering things +# Drinking mare's milk +# Destroying civilisations +# Fighting + + +# Chance of Mongols appearing per year between 1180 and 1250 +temujin_appearance_base_chance = 1 + +# Weight used in selecting targets for the automated Mongol invasions +mongol_invasion_target_character_weight = { + value = 0.001 + every_sub_realm_county = { + if = { + limit = { + title_province = { + geographical_region = special_mongol_empire_start_region + } + } + add = 10000 + } + else_if = { + limit = { + title_province = { + geographical_region = special_mongol_empire_conquest_region_prio_1 + } + } + add = 5000 + } + else_if = { + limit = { + title_province = { + geographical_region = special_mongol_empire_conquest_region_prio_2 + } + } + add = 3000 + } + else_if = { + limit = { + title_province = { + geographical_region = special_mongol_empire_conquest_region_prio_3 + } + } + add = 2000 + } + else_if = { + limit = { + title_province = { + geographical_region = special_mongol_empire_conquest_region_prio_4 + } + } + add = 1000 + } + else_if = { + limit = { + title_province = { + geographical_region = special_mongol_empire_conquest_region_prio_5 + } + } + add = 500 + } + else_if = { + limit = { + title_province = { + geographical_region = special_mongol_empire_conquest_region_cleanup + } + } + add = 250 + } + else_if = { + limit = { + title_province = { + geographical_region = world_tibet + } + } + add = -100 + } + } +} + +# Mongol breakup succession score +mongol_breakup_succession_score = { + # Prioritize the actual heir + if = { + limit = { + exists = scope:old_mongol_emperor.primary_heir + this = scope:old_mongol_emperor.primary_heir + } + add = 100 + } + # A bonus for being of the same house + if = { + limit = { + exists = house + house = scope:old_mongol_emperor.house + } + add = 50 + } + # Prioritize siblings + if = { + limit = { + is_sibling_of = scope:old_mongol_emperor + } + add = 100 + } + # Children of children of the old khan gain some priority + else_if = { + limit = { + any_parent = { + any_parent = { + this = scope:old_mongol_emperor + } + } + } + add = 50 + } + else_if = { + limit = { + is_close_family_of = scope:old_mongol_emperor + } + add = 30 + } + else_if = { + limit = { + is_close_or_extended_family_of = scope:old_mongol_emperor + } + add = 15 + } + # Skill bonuses + add = sum_of_all_skills_value + + # Gender preference, can't check for realm law so using faith + if = { + limit = { + is_female = yes + scope:old_mongol_emperor.faith = { + has_doctrine_parameter = male_dominated_law + } + } + multiply = 0.1 + } + else_if = { + limit = { + scope:old_mongol_emperor.faith = { + has_doctrine_parameter = female_dominated_law + } + } + multiply = 0.1 + } + + # A penalty for not being the same culture, mongol, or an accepted culture + if = { + limit = { + NOR = { + culture = scope:old_mongol_emperor.culture + culture = culture:mongol + culture = { + cultural_acceptance = { + target = scope:old_mongol_emperor.culture + value >= 75 + } + } + } + } + multiply = 0.1 + } + + # Not adult + if = { + limit = { + is_adult = no + } + multiply = 0.1 + } + + # Ill health + if = { + limit = { + OR = { + has_contagious_deadly_disease_trigger = yes + has_epidemic_disease_trigger = yes + health <= poor_health + has_trait = infirm + has_trait = incapable + } + } + multiply = 0.01 + } +} + +temujin_soldier_female_chance = { + if = { + limit = { + NOT = { dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:temujin } } } + dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:temujin } } + } + add = 0 + } + else_if = { + limit = { + dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:temujin } } + NOT = { dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:temujin } } } + } + add = 100 + } + else = { + add = 50 + } +} + +mongol_successor_faith_chance = { + value = 0 + save_temporary_scope_as = county_faith_check + add = { + scope:faith_changer = { + every_vassal = { + faith = scope:county_faith_check.faith + } + add = 5 + } + } +} \ No newline at end of file diff --git a/common/script_values/00_scheme_values.txt b/common/script_values/00_scheme_values.txt new file mode 100644 index 00000000..10c83cfe --- /dev/null +++ b/common/script_values/00_scheme_values.txt @@ -0,0 +1,4863 @@ +################### +# SCHEME VALUES # +################### +# Determines the scheme progress loss when declining to execute it at full progress +decline_execution_setback = -3 +major_decline_execution_setback = -5 + +# Failed scheme setback values +scheme_failed_outcome_setback_value = -7 + +#Scheme progress changes, 10% of current phase duration max in days +scheme_progress_gain = { + value = scope:scheme.scheme_phase_duration + subtract = scope:scheme.scheme_progress + multiply = 0.1 +} +scheme_progress_loss = { + value = scope:scheme.scheme_phase_duration + subtract = scope:scheme.scheme_progress + multiply = -0.1 +} +# Secrecy changes +minor_secrecy_loss = -0.05 +medium_secrecy_loss = -0.1 +major_secrecy_loss = -0.15 +minor_secrecy_gain = 0.05 +medium_secrecy_gain = 0.1 +major_secrecy_gain = 0.15 + +#Watchful Modifier +watchful_modifier_duration = 730 + + +# EVENT COOLDOWN FOR VARIOUS SCHEMES +default_scheme_event_cooldown_duration_value = 730 +spy_scheme_event_cooldown_time = 365 + +# BRIBES +bribe_value = { + value = 50 + if = { + limit = { + scope:recipient.ai_greed > 0 + } + add = { + value = scope:recipient.ai_greed + divide = 4 + } + } + + if = { + limit = { + scope:recipient = { is_playable_character = yes } + scope:recipient.primary_title.tier < tier_duchy + } + multiply = 2 + } + else_if = { + limit = { + scope:recipient.primary_title.tier >= tier_duchy + } + multiply = 3 + } + + if = { + limit = { + scope:recipient = { + liege = scope:actor + is_theocratic_lessee = yes + } + scope:actor.primary_title.tier < tier_duchy + } + multiply = 2 + } + else_if = { + limit = { + scope:recipient = { + liege = scope:actor + is_theocratic_lessee = yes + } + scope:actor.primary_title.tier >= tier_duchy + } + multiply = 3 + } + + if = { + limit = { + scope:actor = { + exists = dynasty + dynasty = { + has_dynasty_perk = guile_legacy_2 + } + } + } + multiply = 0.5 + } + + if = { + limit = { + scope:recipient = { + OR = { + AND = { + is_playable_character = yes + government_has_flag = government_is_tribal + } + AND = { + is_playable_character = no + exists = liege + liege = { + government_has_flag = government_is_tribal + } + } + AND = { + is_playable_character = no + exists = host + host = { + government_has_flag = government_is_tribal + } + } + } + } + } + multiply = 0.25 + min = 5 + } + + # Discount from BP2 imaginary friend story cycle ending + if = { + limit = { + scope:actor = { has_character_modifier = imaginary_friend_mad_modifier } + } + multiply = 0.5 + min = 5 + } +} + +greater_bribe_value = { + value = { add = bribe_value } + multiply = 2 +} + +prestige_bribe_value = { + # Base. + value = medium_prestige_value + # Your tier. + add = { + value = 25 + multiply = scope:actor.highest_held_title_tier + } + # Their tier. + add = { + value = 25 + multiply = scope:recipient.highest_held_title_tier + } +} + +influence_bribe_value = { + # Base. + value = major_influence_value + # Your tier. + add = { + value = 25 + multiply = scope:actor.highest_held_title_tier + } + # Their tier. + add = { + value = 25 + multiply = scope:recipient.highest_held_title_tier + } +} + +piety_bribe_value = { + # Base. + value = medium_piety_value + # Your tier. + add = { + value = 25 + multiply = scope:actor.highest_held_title_tier + } + # Their tier. + add = { + value = 25 + multiply = scope:recipient.highest_held_title_tier + } +} + +#GIFTS +gift_value = { + value = 50 + if = { + limit = { + scope:recipient.ai_greed > 0 + } + add = { + value = scope:recipient.ai_greed + divide = 4 + } + } + + if = { + limit = { + scope:recipient = { is_playable_character = yes } + scope:recipient.primary_title.tier < tier_duchy + } + multiply = 2 + } + else_if = { + limit = { + scope:recipient.primary_title.tier >= tier_duchy + } + multiply = 3 + } + + if = { + limit = { + scope:recipient = { + liege = scope:actor + is_theocratic_lessee = yes + } + scope:actor.primary_title.tier < tier_duchy + } + multiply = 2 + } + else_if = { + limit = { + scope:recipient = { + liege = scope:actor + is_theocratic_lessee = yes + } + scope:actor.primary_title.tier >= tier_duchy + } + multiply = 3 + } + + if = { + limit = { + scope:actor = { + exists = dynasty + dynasty = { + has_dynasty_perk = fp1_adventure_legacy_2 + } + } + } + multiply = 0.5 + } + + if = { + limit = { + scope:recipient = { + OR = { + AND = { + is_playable_character = yes + government_has_flag = government_is_tribal + } + AND = { + is_playable_character = no + exists = liege + liege = { + government_has_flag = government_is_tribal + } + } + AND = { + is_playable_character = no + exists = host + host = { + government_has_flag = government_is_tribal + } + } + } + } + } + multiply = 0.25 + min = 5 + } +} + +bribe_acceptance_value = { + value = 10 + if = { + limit = { + root.ai_greed > 0 + } + add = root.ai_greed + } + divide = 5 + ceiling = yes + multiply = 5 +} + +sway_opinion_increase_per_success = 25 +sway_max_value = 100 + +# Claim Throne values +claim_throne_discovered_prestige_loss = { + value = major_prestige_loss +} +claim_throne_discovered_failure_prestige_loss = { + value = medium_prestige_loss +} + +# Vengeful Trait Scheme Success Chance Modifier +vengeful_scheme_success_chance_modifier = 15 + +court_scheme_max_compatability_value = { + value = 30 + if = { + limit = { + culture = { + has_cultural_parameter = ai_romance_scheme_increase + } + } + add = 70 + } +} + +################################################## +# Schemes 2.5 + +################################################## +# Misc Values + +# Script copy of a define for easier, more legible referencing. +opportunity_cap_value = { value = define:NScheme|SCHEME_MAX_OPPORTUNITIES } + +################################################## +# Parameter Values + +# Control values for scheme parameters +## There's gonna be a lot of dumb letter abbreviations here, just go with it: the script will _not_ be readable by mortal eyes if we write the whole thing out. +## t1 is slow. +## t2 is average. +## t3 is fast. +### Base Progress Goal +#### Each one is the _base_ length for a phase to take for schemes of that tempo, before speed modifiers are applied. +t3_base_phase_length_value = 70 +t2_base_phase_length_value = 120 +t1_base_phase_length_value = 170 +### Base Maximum Success +#### Max success before agents. +t1_base_max_success_value = 20 +t2_base_max_success_value = 30 +t3_base_max_success_value = 40 +### Speed per Skill Point +#### How many days we knock off phase duration per relevant skill point of the scheme owner. +t3_spsp_owner_value = -0.5 +t2_spsp_owner_value = -0.25 +t1_spsp_owner_value = -0.1 +### Speed per Target Skill Point +#### How many days we add on to phase duration per relevant skill point of the scheme target. +t3_spsp_target_value = 0.3 +t2_spsp_target_value = 0.1 +t1_spsp_target_value = 0.05 +### Spymaster Speed per Skill Point +#### How many days we knock off phase duration per relevant skill point of the scheme owner's spymaster. +t3_spsp_owner_spy_value = -0.3 +t2_spsp_owner_spy_value = -0.15 +t1_spsp_owner_spy_value = -0.05 +### Target Spymaster Speed per Skill Point +#### How many days we add on to phase duration per relevant skill point of the scheme target's spymaster. +t3_spsp_target_spy_value = 0.3 +t2_spsp_target_spy_value = 0.1 +t1_spsp_target_spy_value = 0.05 +### Success Chance Growth per Skill Point +#### How much success chance per phase per relevant skill point of the scheme owner. +laamp_contract_scgpsp_value = 0.7 +t3_scgpsp_value = 0.6 +t2_scgpsp_value = 0.45 +t1_scgpsp_value = 0.3 + +# Scheme speed standardisation modifiers. +## Speeding up a scheme. +microscopic_scheme_phase_duration_bonus_value = -2 +miniscule_scheme_phase_duration_bonus_value = -5 +minor_scheme_phase_duration_bonus_value = -10 +medium_scheme_phase_duration_bonus_value = -20 +major_scheme_phase_duration_bonus_value = -40 +massive_scheme_phase_duration_bonus_value = -60 +monumental_scheme_phase_duration_bonus_value = -100 +## Slowing down a scheme. +microscopic_scheme_phase_duration_malus_value = 2 +miniscule_scheme_phase_duration_malus_value = 5 +minor_scheme_phase_duration_malus_value = 10 +medium_scheme_phase_duration_malus_value = 20 +major_scheme_phase_duration_malus_value = 40 +massive_scheme_phase_duration_malus_value = 60 +monumental_scheme_phase_duration_malus_value = 100 + +################################################## +# Success Chance Values + +scheme_phases_till_max_success_value = { + value = max_scheme_success_chance + subtract = scheme_success_chance + #TODO_CD_EP3; get the actual scheme growth value from Code, this is just keyed to murder. + divide = { + value = scheme_owner.intrigue + multiply = 0.3 + } + ceiling = yes +} + +# What % intercept chance does this thing grant against murder schemes? +## We don't use these for court positions, generally, because we want more fine-tuning per court position & between their breakpoints. +add_intercept_repeatable_minor_value = 2 +add_intercept_repeatable_medium_value = 5 +add_intercept_repeatable_major_value = 10 +add_intercept_repeatable_massive_value = 20 + +scheme_intercept_repeatable_chance_total_value = { + # Court positions. + ## Remember with all of these: it's an aggregate, so if you give one court position (_especially_ one that you can have multiple of) too much, then you may render a character unmurderable. + ## Bodyguard. + ### Has subsumed the shieldmaiden/varangian variants: means we don't have to iterate over courtiers. + if = { + limit = { employs_court_position = bodyguard_court_position } + every_court_position_holder = { + type = bodyguard_court_position + limit = { bodyguard_will_actually_do_job_trigger = yes } + # Now we add aptitude per breakpoint, starting highest to lowest. + ## Excellent + if = { + limit = { aptitude:bodyguard_court_position >= 4 } + add = 10 + } + ## Good + else_if = { + limit = { aptitude:bodyguard_court_position = 3 } + add = 8 + } + ## Average + else_if = { + limit = { aptitude:bodyguard_court_position = 2 } + add = 6 + } + ## Poor + else_if = { + limit = { aptitude:bodyguard_court_position = 1 } + add = 4 + } + ## Terrible + else = { add = 2 } + } + } + ## Food taster. + if = { + limit = { employs_court_position = food_taster_court_position } + every_court_position_holder = { + type = food_taster_court_position + limit = { foodtaster_will_actually_do_job_trigger = yes } + # Now we add aptitude per breakpoint, starting highest to lowest. + ## Excellent + if = { + limit = { aptitude:food_taster_court_position >= 4 } + add = 8 + } + ## Good + else_if = { + limit = { aptitude:food_taster_court_position = 3 } + add = 6 + } + ## Average + else_if = { + limit = { aptitude:food_taster_court_position = 2 } + add = 4 + } + ## Poor + else_if = { + limit = { aptitude:food_taster_court_position = 1 } + add = 2 + } + ## Terrible + else = { add = 1 } + } + } + ## Cupbearer. + if = { + limit = { employs_court_position = cupbearer_court_position } + every_court_position_holder = { + type = cupbearer_court_position + limit = { cupbearer_will_actually_do_job_trigger = yes } + # Now we add aptitude per breakpoint, starting highest to lowest. + ## Excellent + if = { + limit = { aptitude:cupbearer_court_position >= 4 } + add = 3 + } + ## Good + else_if = { + limit = { aptitude:cupbearer_court_position = 3 } + add = 2 + } + ## Average + else_if = { + limit = { aptitude:cupbearer_court_position = 2 } + add = 1 + } + ## Poor + else_if = { + limit = { aptitude:cupbearer_court_position = 1 } + add = 0 + } + ## Terrible + else = { add = 0 } + } + } + # Traits. + ## Gluttonous. + if = { + limit = { has_trait = gluttonous } + add = add_intercept_repeatable_minor_value + } + # Character modifiers. + ## Personal guard. + if = { + limit = { has_character_modifier = spouse_martial_personal_guard_modifier } + add = add_intercept_repeatable_major_value + } + + # You can never have more than a certain amount of intercept value. + max = 75 +} + +################################################## +# Secrecy Values + +# Cap secrecy for the scheme_owner to a sensible maximum value so that you can't single-handedly cover up for every gossip in the world. +secrecy_skill_contribution_max_value = 40 + +secrecy_base_value = { + add = { + value = 20 + desc = BASE + } + # Reduce by the target's scheme discovery chance, if appropriate. + if = { + limit = { + # Scheme has to exist already. + exists = this + # We gotta be facing a character. + is_scheme_target_type = character + # Do they have a spymaster... + scheme_target_character.cp:councillor_spymaster ?= { + # ... who is performing the appropriate task... + is_performing_council_task = task_disrupt_schemes + NOR = { + # ... who _isn't_ the scheme owner... + this = scope:owner + # ... or an agent in the scheme. + save_temporary_scope_as = char_temp + root = { + any_scheme_agent_character = { this = scope:char_temp } + } + } + } + } + add = { + value = scope:target.cp:councillor_spymaster.spymaster_disrupt_schemes_total_modifier + multiply = -1 + desc = secrecy.scheme_owner.spymaster.disrupt_schemes + } + } +} +secrecy_agent_count_reduction_value = { + add = { + value = { + every_scheme_agent_slot = { + limit = { + is_filled = yes + NOT = { agent_slot_has_contribution_type = secrecy } + } + add = -10 + } + } + desc = secrecy.num_agents + } +} + +# How many months, by default, before a scheme can be discovered in the monthly check? +## Schemes can always be discovered when they attempt conclusion. +## Only referenced in one spot in script, but we use a script value regardless so that we can refer to it in loc. +secrecy_grace_period_value = 6 + +# How many extra months of grace you get from the Court of Shadows lifestyle perk. +court_of_shadows_extra_secrecy_grace_value = 4 + +# The actual value checked for starting grace on a scheme — any extra bonuses can be fed in here (though you can also adjust it on the fly by modifying the variable set on the scheme itself). +secrecy_grace_character_total_starting_value = { + value = secrecy_grace_period_value + scope:scheme_launcher ?= { + if = { + limit = { has_perk = court_of_shadows_perk } + add = court_of_shadows_extra_secrecy_grace_value + } + } +} + +# Calc if the next scheme breach we get would destroy the scoped scheme. +scheme_breaches_about_to_hit_limit_value = { + value = maximum_scheme_breaches + add = -1 +} + +################################################## +# Interaction Values + +# Standardised scheme starter package values, so that we can fake it for the widget. +scheme_starter_bonus_success_chance_value = 20 +scheme_starter_bonus_secrecy_value = 25 +scheme_starter_bonus_speed_value = -20 + +scheme_starter_duration_value = 8 +scheme_starter_success_chance_cost_value = { value = major_gold_value } +scheme_starter_speed_cost_value = { value = medium_gold_value } +scheme_starter_secrecy_cost_value = { value = minor_gold_value } + +################################################## +# Agent Values + +# How many agents can a character have in a scheme before they're forced to make a final try? +character_max_scheme_agents_value = 5 + +# How many agent slots are filled in the scheme atm? +current_scheme_filled_agent_slots_value = { + every_scheme_agent_slot = { + limit = { is_filled = yes } + add = 1 + } +} + +# How much do we reduce the weight on agent types that we already have in a scheme? +weight_down_existing_agent_slots_value = 0.5 + +# What're the upper and lower constraints for how much contribution an agent can give? +## Because we don't want any agent to insta-boost you too high. +agent_scheme_contributor_max = 50 +## Aaaaaand it's just way less of a headache of edge cases if they're never literally zero. +agent_scheme_contributor_min = 1 + + +# Standard base value for agent contribution. +## Atm, we only really use this for calculating degree of closeness bonuses for agents in hostile schemes. +## Nothing stopping it from being updated for something like the inverse, though: best friends better at the plan_surprise_party scheme or whatever. +### Control values. +scheme_agent_general_bonuses_contribution_score_bonus_max_value = agent_max_skill_value +scheme_agent_general_bonuses_contribution_score_bonus_massive_value = 30 +scheme_agent_general_bonuses_contribution_score_bonus_major_value = 20 +scheme_agent_general_bonuses_contribution_score_bonus_medium_value = 10 +scheme_agent_general_bonuses_contribution_score_bonus_minor_value = 5 +scheme_agent_general_bonuses_contribution_score_bonus_miniscule_value = 2 +### Actual value. +scheme_agent_general_bonuses_contribution_score_value = { + # First off, are we dealing with a hostile scheme against a character or a title? + if = { + limit = { + exists = scope:target + trigger_if = { + limit = { + scope:scheme ?= { + is_scheme_target_type = character + is_scheme_category = hostile + } + } + scope:scheme ?= { + scheme_target_character = { save_temporary_scope_as = target_character } + } + } + trigger_else_if = { + limit = { + scope:scheme ?= { + is_scheme_target_type = title + is_scheme_category = hostile + } + } + scope:scheme ?= { + scheme_target_title.holder ?= { save_temporary_scope_as = target_character } + } + } + trigger_else = { always = no } + } + # Do we have a scope:target_character to play with now? + if = { + limit = { exists = scope:target_character } + # Degree of closeness to target. + if = { + limit = { + scope:target_character = { + is_ruler = yes + cp:councillor_spymaster ?= prev + } + } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_max_value + desc = "SCHEME_AGENT_IS_SPYMASTER_IN_MY_COURT" + } + } + else_if = { + limit = { + scope:target_character = { is_ruler = no } + has_council_position = councillor_spymaster + scope:target_character.liege.cp:councillor_spymaster ?= this + } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_max_value + desc = "SCHEME_AGENT_IS_SPYMASTER" + } + } + else_if = { + limit = { is_spouse_of = scope:target_character } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_massive_value + desc = "SCHEME_AGENT_IS_SPOUSE" + } + } + else_if = { + limit = { has_relation_best_friend = scope:target_character } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_massive_value + desc = "SCHEME_AGENT_IS_BEST_FRIEND" + } + } + else_if = { + limit = { has_relation_ward = scope:target_character } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_massive_value + desc = "SCHEME_AGENT_IS_GUARDIAN" + } + } + else_if = { + limit = { is_diarch_of_target = scope:target_character } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_massive_value + desc = "SCHEME_AGENT_IS_DIARCH" + } + } + else_if = { + limit = { has_relation_friend = scope:target_character } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_major_value + desc = "SCHEME_AGENT_IS_FRIEND" + } + } + else_if = { + limit = { is_concubine_of = scope:target_character } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_major_value + desc = "SCHEME_AGENT_IS_CONCUBINE" + } + } + else_if = { + limit = { has_relation_lover = scope:target_character } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_major_value + desc = "SCHEME_AGENT_IS_LOVER" + } + } + else_if = { + limit = { + has_court_position = court_physician_court_position + is_court_position_employer = { + court_position = court_physician_court_position + who = scope:target_character + } + } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_major_value + desc = "SCHEME_AGENT_IS_COURT_PHYSICIAN" + } + } + else_if = { + limit = { + has_court_position = food_taster_court_position + is_court_position_employer = { + court_position = food_taster_court_position + who = scope:target_character + } + } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_major_value + desc = "SCHEME_AGENT_IS_FOOD_TASTER" + } + } + else_if = { + limit = { + has_court_position = cupbearer_court_position + is_court_position_employer = { + court_position = cupbearer_court_position + who = scope:target_character + } + } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_major_value + desc = "SCHEME_AGENT_IS_CUP_BEARER" + } + } + else_if = { + limit = { + has_court_position = chief_eunuch_court_position + is_court_position_employer = { + court_position = chief_eunuch_court_position + who = scope:target_character + } + } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_major_value + desc = "SCHEME_AGENT_IS_CHIEF_EUNUCH" + } + } + else_if = { + limit = { + has_court_position = bodyguard_court_position + is_court_position_employer = { + court_position = bodyguard_court_position + who = scope:target_character + } + } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_major_value + desc = "SCHEME_AGENT_IS_BODYGUARD" + } + } + else_if = { + limit = { + has_court_position = lady_in_waiting_court_position + is_court_position_employer = { + court_position = lady_in_waiting_court_position + who = scope:target_character + } + } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_minor_value + desc = "SCHEME_AGENT_IS_LADY_IN_WAITING" + } + } + else_if = { + limit = { + is_councillor_of = scope:target_character + NOT = { has_council_position = councillor_spymaster } + } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_medium_value + desc = "SCHEME_AGENT_IS_COUNCILLOR" + } + } + else_if = { + limit = { is_close_family_of = scope:target_character } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_medium_value + desc = "SCHEME_AGENT_IS_CLOSE_KIN" + } + } + else_if = { + limit = { is_powerful_vassal_of = scope:target_character } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_minor_value + desc = "SCHEME_AGENT_IS_POWERFUL_VASSAL" + } + } + else_if = { + limit = { is_extended_family_of = scope:target_character } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_minor_value + desc = "SCHEME_AGENT_IS_EXTENDED_FAMILY" + } + } + else_if = { + limit = { + scope:target_character = { is_ruler = yes } + is_ruler = yes + } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_miniscule_value + desc = "SCHEME_AGENT_IS_VASSAL" + } + } + else_if = { + limit = { + scope:target_character = { is_ruler = no } + is_ruler = yes + } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_miniscule_value + desc = "SCHEME_AGENT_IS_VASSAL_OF_LIEGE" + } + } + # Rivalry boosts an agent's industriousness. + if = { + limit = { has_relation_nemesis = scope:target_character } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_medium_value + desc = "SCHEME_AGENT_IS_NEMESIS" + } + } + else_if = { + limit = { has_relation_rival = scope:target_character } + add = { + add = scheme_agent_general_bonuses_contribution_score_bonus_minor_value + desc = "SCHEME_AGENT_IS_RIVAL" + } + } + } + } + # Otherwise nada. + else = { value = 0 } +} + +# Agent contribution setup values. +# How much can any one of an agent's skills contribute to their score? +agent_max_skill_value = 25 + +# Ratio of 75% major skill to 25% minor skill. +agent_3to1_3_skill_mult_value = 0.75 +agent_3to1_1_skill_mult_value = 0.25 + +# Ratio of 50% between two skills. +agent_1to1_1_skill_mult_value = 0.5 + +# Ratio of 50% major skill to 25% for two minor skills. +agent_2to1to1_2_skill_mult_value = 0.5 +agent_2to1to1_1_skill_mult_value = 0.25 + +# Trait bonus'n'malus tiers. +agent_trait_bonus_t3_value = 9 +agent_trait_bonus_t2_value = 6 +agent_trait_bonus_t1_value = 3 +agent_trait_malus_t1_value = -3 +agent_trait_malus_t2_value = -6 +agent_trait_malus_t3_value = -9 + +# Political Schemem agent values +political_agent_max_skill_value = 15 +agent_house_power_score_mult = 0.1 +agent_max_house_power_value = 30 + +agent_house_power_score_value = { + value = 0 + if = { + limit = { exists = house } + add = house.house_power_score + } + multiply = agent_house_power_score_mult + ceiling = yes + max = agent_max_house_power_value + desc = scheme_agent_aptitude.scaled_house_power_score +} + +# Sync values for agents that have multiple contribution types. +## Justiciar. +agent_justiciar_contribution_value = { + # Base value. + value = scheme_agent_general_bonuses_contribution_score_value + # Skills + ## Learning + add = { + value = learning + multiply = agent_3to1_3_skill_mult_value + ceiling = yes + max = agent_max_skill_value + desc = scheme_agent_aptitude.skill.learning + } + ## Diplomacy + add = { + value = diplomacy + multiply = agent_3to1_1_skill_mult_value + ceiling = yes + max = agent_max_skill_value + desc = scheme_agent_aptitude.skill.diplomacy + } + # Traits + ## Bonuses + ### +++ Just + if = { + limit = { has_trait = just } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.just + } + } + ### +++ Diligent + if = { + limit = { has_trait = diligent } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.diligent + } + } + ### +++ Honest + if = { + limit = { has_trait = honest } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.honest + } + } + ### ++ Patient + if = { + limit = { has_trait = patient } + add = { + value = agent_trait_bonus_t2_value + desc = scheme_agent_aptitude.trait.patient + } + } + ### + Paranoid + if = { + limit = { has_trait = paranoid } + add = { + value = agent_trait_bonus_t1_value + desc = scheme_agent_aptitude.trait.paranoid + } + } + ## Maluses + ### - Trusting + if = { + limit = { has_trait = trusting } + add = { + value = agent_trait_malus_t1_value + desc = scheme_agent_aptitude.trait.trusting + } + } + ### -- Impatient + if = { + limit = { has_trait = impatient } + add = { + value = agent_trait_malus_t2_value + desc = scheme_agent_aptitude.trait.impatient + } + } + ### --- Deceitful + if = { + limit = { has_trait = deceitful } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.deceitful + } + } + ### --- Diligent + if = { + limit = { has_trait = diligent } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.diligent + } + } + ### --- Arbitrary + if = { + limit = { has_trait = arbitrary } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.arbitrary + } + } + + # Cap this off. + max = agent_scheme_contributor_max + min = agent_scheme_contributor_min +} +## Wrangler +agent_wrangler_contribution_value = { + value = scheme_agent_general_bonuses_contribution_score_value + # Skills + ## Diplomacy + add = { + value = diplomacy + multiply = agent_3to1_3_skill_mult_value + ceiling = yes + max = agent_max_skill_value + desc = scheme_agent_aptitude.skill.diplomacy + } + ## Intrigue + add = { + value = intrigue + multiply = agent_3to1_1_skill_mult_value + ceiling = yes + max = agent_max_skill_value + desc = scheme_agent_aptitude.skill.intrigue + } + # Traits + ## Bonuses + ### +++ Gregarious + if = { + limit = { has_trait = gregarious } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.gregarious + } + } + ### +++ Diplomat + if = { + limit = { has_trait = diplomat } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.diplomat + } + } + ### ++ Arrogant + if = { + limit = { has_trait = arrogant } + add = { + value = agent_trait_bonus_t2_value + desc = scheme_agent_aptitude.trait.arrogant + } + } + ### ++ Ambitious + if = { + limit = { has_trait = ambitious } + add = { + value = agent_trait_bonus_t2_value + desc = scheme_agent_aptitude.trait.ambitious + } + } + ### + Eccentric + if = { + limit = { has_trait = eccentric } + add = { + value = agent_trait_bonus_t1_value + desc = scheme_agent_aptitude.trait.eccentric + } + } + ## Maluses + ### - Temperate + if = { + limit = { has_trait = temperate } + add = { + value = agent_trait_malus_t1_value + desc = scheme_agent_aptitude.trait.temperate + } + } + ### -- Humble + if = { + limit = { has_trait = humble } + add = { + value = agent_trait_malus_t2_value + desc = scheme_agent_aptitude.trait.humble + } + } + ### -- Trusting + if = { + limit = { has_trait = trusting } + add = { + value = agent_trait_malus_t2_value + desc = scheme_agent_aptitude.trait.trusting + } + } + ### --- Content + if = { + limit = { has_trait = content } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.content + } + } + ### --- Forgiving + if = { + limit = { has_trait = forgiving } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.forgiving + } + } + ### --- Shy + if = { + limit = { has_trait = shy } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.shy + } + } + # Cap this off. + max = agent_scheme_contributor_max + min = agent_scheme_contributor_min +} +## Cleric +agent_cleric_contribution_value = { + # Base value. + value = scheme_agent_general_bonuses_contribution_score_value + # Skills + ## Diplomacy + add = { + value = diplomacy + multiply = agent_3to1_3_skill_mult_value + ceiling = yes + max = agent_max_skill_value + desc = scheme_agent_aptitude.skill.diplomacy + } + ## Learning + add = { + value = learning + multiply = agent_3to1_1_skill_mult_value + ceiling = yes + max = agent_max_skill_value + desc = scheme_agent_aptitude.skill.learning + } + # Traits + ## Bonuses + ### +++ Zealous + if = { + limit = { has_trait = zealous } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.zealous + } + } + ### ++ Humble + if = { + limit = { has_trait = humble } + add = { + value = agent_trait_bonus_t2_value + desc = scheme_agent_aptitude.trait.humble + } + } + ### ++ Diligent + if = { + limit = { has_trait = diligent } + add = { + value = agent_trait_bonus_t2_value + desc = scheme_agent_aptitude.trait.diligent + } + } + ### + Honest + if = { + limit = { has_trait = honest } + add = { + value = agent_trait_bonus_t1_value + desc = scheme_agent_aptitude.trait.honest + } + } + ## Maluses + ### - Deceitful + if = { + limit = { has_trait = deceitful } + add = { + value = agent_trait_malus_t1_value + desc = scheme_agent_aptitude.trait.deceitful + } + } + ### -- Lazy + if = { + limit = { has_trait = lazy } + add = { + value = agent_trait_malus_t2_value + desc = scheme_agent_aptitude.trait.lazy + } + } + ### -- Arrogant + if = { + limit = { has_trait = arrogant } + add = { + value = agent_trait_malus_t2_value + desc = scheme_agent_aptitude.trait.arrogant + } + } + ### --- Cynical + if = { + limit = { has_trait = cynical } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.cynical + } + } + + # Cap this off. + max = agent_scheme_contributor_max + min = agent_scheme_contributor_min +} +## Theologian +agent_theologian_contribution_value = { + # Base value. + value = scheme_agent_general_bonuses_contribution_score_value + # Skills + ## Learning + add = { + value = learning + multiply = agent_3to1_3_skill_mult_value + ceiling = yes + max = agent_max_skill_value + desc = scheme_agent_aptitude.skill.learning + } + ## Diplomacy + add = { + value = diplomacy + multiply = agent_3to1_1_skill_mult_value + ceiling = yes + max = agent_max_skill_value + desc = scheme_agent_aptitude.skill.diplomacy + } + # Traits + ## Bonuses + ### +++ Just + if = { + limit = { has_trait = just } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.just + } + } + ### +++ Zealous + if = { + limit = { has_trait = zealous } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.zealous + } + } + ### +++ Stubborn + if = { + limit = { has_trait = stubborn } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.stubborn + } + } + ### ++ Calm (we like both measured responses...) + if = { + limit = { has_trait = calm } + add = { + value = agent_trait_bonus_t2_value + desc = scheme_agent_aptitude.trait.calm + } + } + ### ++ Wrathful (... and less measured ones) + if = { + limit = { has_trait = wrathful } + add = { + value = agent_trait_bonus_t2_value + desc = scheme_agent_aptitude.trait.wrathful + } + } + ### ++ Diligent + if = { + limit = { has_trait = diligent } + add = { + value = agent_trait_bonus_t2_value + desc = scheme_agent_aptitude.trait.diligent + } + } + ### + Eccentric + if = { + limit = { has_trait = eccentric } + add = { + value = agent_trait_bonus_t1_value + desc = scheme_agent_aptitude.trait.eccentric + } + } + ## Maluses + ### -- Lazy + if = { + limit = { has_trait = lazy } + add = { + value = agent_trait_malus_t2_value + desc = scheme_agent_aptitude.trait.lazy + } + } + ### --- Fickle + if = { + limit = { has_trait = fickle } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.fickle + } + } + ### --- Cynical + if = { + limit = { has_trait = cynical } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.cynical + } + } + ### --- Arbitrary + if = { + limit = { has_trait = arbitrary } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.arbitrary + } + } + + # Cap this off. + max = agent_scheme_contributor_max + min = agent_scheme_contributor_min +} +## Lookout +agent_lookout_contribution_value = { + # Base value. + value = scheme_agent_general_bonuses_contribution_score_value + # Skills + ## Intrigue + add = { + value = intrigue + multiply = agent_3to1_3_skill_mult_value + ceiling = yes + max = agent_max_skill_value + desc = scheme_agent_aptitude.skill.intrigue + } + ## Martial + add = { + value = martial + multiply = agent_3to1_1_skill_mult_value + ceiling = yes + max = agent_max_skill_value + desc = scheme_agent_aptitude.skill.martial + } + # Traits + ## Bonuses + ### +++ Patient + if = { + limit = { has_trait = patient } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.patient + } + } + ### +++ Diligent + if = { + limit = { has_trait = diligent } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.diligent + } + } + ### +++ Paranoid + if = { + limit = { has_trait = paranoid } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.paranoid + } + } + ### + Brave + if = { + limit = { has_trait = brave } + add = { + value = agent_trait_bonus_t1_value + desc = scheme_agent_aptitude.trait.brave + } + } + ## Maluses + ### - Craven + if = { + limit = { has_trait = craven } + add = { + value = agent_trait_malus_t1_value + desc = scheme_agent_aptitude.trait.craven + } + } + ### -- Trusting + if = { + limit = { has_trait = trusting } + add = { + value = agent_trait_malus_t2_value + desc = scheme_agent_aptitude.trait.trusting + } + } + ### --- Lazy + if = { + limit = { has_trait = lazy } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.lazy + } + } + ### --- Impatient + if = { + limit = { has_trait = impatient } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.impatient + } + } + + # Cap this off. + max = agent_scheme_contributor_max + min = agent_scheme_contributor_min +} +## Gabbler +agent_gabbler_contribution_value = { + # Base value. + value = scheme_agent_general_bonuses_contribution_score_value + # Skills + ## Diplomacy + add = { + value = diplomacy + multiply = agent_1to1_1_skill_mult_value + ceiling = yes + max = agent_max_skill_value + desc = scheme_agent_aptitude.skill.diplomacy + } + ## Intrigue + add = { + value = intrigue + multiply = agent_1to1_1_skill_mult_value + ceiling = yes + max = agent_max_skill_value + desc = scheme_agent_aptitude.skill.intrigue + } + # Traits + ## Bonuses + ### +++ Gregarious + if = { + limit = { has_trait = gregarious } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.gregarious + } + } + ### +++ Eccentric + if = { + limit = { has_trait = eccentric } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.eccentric + } + } + ### +++ Fickle + if = { + limit = { has_trait = fickle } + add = { + value = agent_trait_bonus_t3_value + desc = scheme_agent_aptitude.trait.fickle + } + } + ### ++ Arrogant + if = { + limit = { has_trait = arrogant } + add = { + value = agent_trait_bonus_t2_value + desc = scheme_agent_aptitude.trait.arrogant + } + } + ### ++ Lazy + if = { + limit = { has_trait = lazy } + add = { + value = agent_trait_bonus_t2_value + desc = scheme_agent_aptitude.trait.lazy + } + } + ### + Brave + if = { + limit = { has_trait = brave } + add = { + value = agent_trait_bonus_t1_value + desc = scheme_agent_aptitude.trait.brave + } + } + ## Maluses + ### - Craven + if = { + limit = { has_trait = craven } + add = { + value = agent_trait_malus_t1_value + desc = scheme_agent_aptitude.trait.craven + } + } + ### -- Diligent + if = { + limit = { has_trait = diligent } + add = { + value = agent_trait_malus_t2_value + desc = scheme_agent_aptitude.trait.diligent + } + } + ### -- Humble + if = { + limit = { has_trait = humble } + add = { + value = agent_trait_malus_t2_value + desc = scheme_agent_aptitude.trait.humble + } + } + ### --- Stubborn + if = { + limit = { has_trait = stubborn } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.stubborn + } + } + ### --- Shy + if = { + limit = { has_trait = shy } + add = { + value = agent_trait_malus_t3_value + desc = scheme_agent_aptitude.trait.shy + } + } + + # Cap this off. + max = agent_scheme_contributor_max + min = agent_scheme_contributor_min +} + +# How many opportunities it takes to spend them inviting an agent to a scheme. +invite_agent_opportunities_t1_value = 3 +invite_agent_opportunities_t2_value = 5 + +# Contribution threshold values — how helpful they're being with a certain scheme. +agent_contribution_poor = 5 +agent_contribution_good = 15 +agent_contribution_excellent = 30 + +################################################## +# Preparation Event Values + +# Weights for how likely scheme agents are to be rolled in critical moments. +critical_moment_agent_weight_very_high_value = 50 +critical_moment_agent_weight_high_value = 25 +critical_moment_agent_weight_medium_value = 15 +critical_moment_agent_weight_low_value = 10 +critical_moment_agent_weight_very_low_value = 5 +# Don't use microscopic. This is largely here as a joke for wolf hunters in romance schemes. +critical_moment_agent_weight_microscopic_value = 1 + +# The standard charge cost for completing a scheme: we need this so we can calculate if bonus options should be cheaper. +scheme_charge_to_advance_threshold_base_value = 2 + +# How many charges does this scheme need before it can attempt completion? +## Default for schemes with only one ending option. +scheme_charge_to_advance_threshold_value = { + # If a scheme has a custom threshold set, use that. + if = { + limit = { has_variable = custom_charge_threshold } + add = var:custom_charge_threshold + } + # Otherwise, use the base. + else = { add = scheme_charge_to_advance_threshold_base_value } +} +## Schemes with multiple ending options cost varying amounts to end, depending on your selected final bonus. +multi_ending_scheme_charge_to_advance_threshold_t1_value = { + # If a scheme has a custom threshold set, use that. + if = { + limit = { + exists = this + has_variable = custom_charge_threshold + var:custom_charge_threshold < scheme_charge_to_advance_threshold_base_value + } + subtract = var:custom_charge_threshold + } + # Now, add the base. + add = 5 + # Make sure this never goes completely nuts. + min = scheme_charge_to_advance_threshold_base_value +} +multi_ending_scheme_charge_to_advance_threshold_t2_value = { + # If a scheme has a custom threshold set, use that. + if = { + limit = { + exists = this + has_variable = custom_charge_threshold + var:custom_charge_threshold < scheme_charge_to_advance_threshold_base_value + } + subtract = var:custom_charge_threshold + } + # Now, add the base. + add = 10 + # Make sure this never goes completely nuts. + min = scheme_charge_to_advance_threshold_base_value +} +multi_ending_scheme_charge_to_advance_threshold_t3_value = { + # If a scheme has a custom threshold set, use that. + if = { + limit = { + exists = this + has_variable = custom_charge_threshold + var:custom_charge_threshold < scheme_charge_to_advance_threshold_base_value + } + subtract = var:custom_charge_threshold + } + # Now, add the base. + add = 15 + # Make sure this never goes completely nuts. + min = scheme_charge_to_advance_threshold_base_value +} +multi_ending_scheme_charge_to_advance_threshold_t4_value = { + # If a scheme has a custom threshold set, use that. + if = { + limit = { + exists = this + has_variable = custom_charge_threshold + var:custom_charge_threshold < scheme_charge_to_advance_threshold_base_value + } + subtract = var:custom_charge_threshold + } + # Now, add the base. + add = 20 + # Make sure this never goes completely nuts. + min = scheme_charge_to_advance_threshold_base_value +} + +# Schemes with multiple ending options come with boosts at the end that we want to reference in loc for brevity. +multi_ending_scheme_buff_t2_value = 5 +multi_ending_scheme_buff_t3_value = 10 +multi_ending_scheme_buff_t4_value = 20 +multi_ending_scheme_buff_t2_total_success_value = { + value = scheme_success_chance + add = multi_ending_scheme_buff_t2_value + max = 95 +} +multi_ending_scheme_buff_t3_total_success_value = { + value = scheme_success_chance + add = multi_ending_scheme_buff_t3_value + max = 95 +} +multi_ending_scheme_buff_t4_total_success_value = { + value = scheme_success_chance + add = multi_ending_scheme_buff_t4_value + max = 95 +} + +# Get the actual max value of our current scheme. +scheme_max_theoretical_success_chance_value = { + if = { + limit = { is_scheme_category = hostile } + value = define:NScheme|HOSTILE_SCHEME_MAX_SUCCESS_CHANCE + } + else_if = { + limit = { is_scheme_category = contract } + value = define:NScheme|CONTRACT_SCHEME_MAX_SUCCESS_CHANCE + } + else_if = { + limit = { is_scheme_category = political } + value = define:NScheme|POLITICAL_SCHEME_MAX_SUCCESS_CHANCE + } + else = { value = define:NScheme|PERSONAL_SCHEME_MAX_SUCCESS_CHANCE } +} + +################################################## +# Pulse Action Values + +# How likely are you to get positive or negative APAs in a scheme, largely dependent on personal skill? +scheme_owner_aptitude_weight_up_positive_value = { + value = 1 + # Diplomacy. + if = { + limit = { scheme_skill = diplomacy } + scope:owner = { + # Excellent skill. + if = { + limit = { diplomacy >= extremely_high_skill_rating } + add = 1 + } + # High skill. + if = { + limit = { diplomacy >= high_skill_rating } + add = 1 + } + # Low skill. + if = { + limit = { diplomacy <= mediocre_skill_rating } + add = -1 + } + # Atrocious skill. + if = { + limit = { diplomacy <= low_skill_rating } + add = -1 + } + } + } + # Martial. + else_if = { + limit = { scheme_skill = martial } + scope:owner = { + # Excellent skill. + if = { + limit = { martial >= extremely_high_skill_rating } + add = 1 + } + # High skill. + if = { + limit = { martial >= high_skill_rating } + add = 1 + } + # Low skill. + if = { + limit = { martial <= mediocre_skill_rating } + add = -1 + } + # Atrocious skill. + if = { + limit = { martial <= low_skill_rating } + add = -1 + } + } + } + # Stewardship. + else_if = { + limit = { scheme_skill = stewardship } + scope:owner = { + # Excellent skill. + if = { + limit = { stewardship >= extremely_high_skill_rating } + add = 1 + } + # High skill. + if = { + limit = { stewardship >= high_skill_rating } + add = 1 + } + # Low skill. + if = { + limit = { stewardship <= mediocre_skill_rating } + add = -1 + } + # Atrocious skill. + if = { + limit = { stewardship <= low_skill_rating } + add = -1 + } + } + } + # Intrigue. + else_if = { + limit = { scheme_skill = intrigue } + scope:owner = { + # Excellent skill. + if = { + limit = { intrigue >= extremely_high_skill_rating } + add = 1 + } + # High skill. + if = { + limit = { intrigue >= high_skill_rating } + add = 1 + } + # Low skill. + if = { + limit = { intrigue <= mediocre_skill_rating } + add = -1 + } + # Atrocious skill. + if = { + limit = { intrigue <= low_skill_rating } + add = -1 + } + } + } + # Learning. + else_if = { + limit = { scheme_skill = learning } + scope:owner = { + # Excellent skill. + if = { + limit = { learning >= extremely_high_skill_rating } + add = 1 + } + # High skill. + if = { + limit = { learning >= high_skill_rating } + add = 1 + } + # Low skill. + if = { + limit = { learning <= mediocre_skill_rating } + add = -1 + } + # Atrocious skill. + if = { + limit = { learning <= low_skill_rating } + add = -1 + } + } + } + # Prowess. + else_if = { + limit = { scheme_skill = prowess } + scope:owner = { + # Excellent skill. + if = { + limit = { prowess >= extremely_high_skill_rating } + add = 1 + } + # High skill. + if = { + limit = { prowess >= high_skill_rating } + add = 1 + } + # Low skill. + if = { + limit = { prowess <= mediocre_skill_rating } + add = -1 + } + # Atrocious skill. + if = { + limit = { prowess <= low_skill_rating } + add = -1 + } + } + } +} +scheme_owner_aptitude_weight_up_negative_value = { + value = 1 + # Diplomacy. + if = { + limit = { scheme_skill = diplomacy } + scope:owner = { + # Atrocious skill. + if = { + limit = { diplomacy <= low_skill_rating } + add = 1 + } + # Low skill. + if = { + limit = { diplomacy <= mediocre_skill_rating } + add = 1 + } + # High skill. + if = { + limit = { diplomacy >= high_skill_rating } + add = -1 + } + # Excellent skill. + if = { + limit = { diplomacy >= extremely_high_skill_rating } + add = -1 + } + } + } + # Martial. + else_if = { + limit = { scheme_skill = martial } + scope:owner = { + # Atrocious skill. + if = { + limit = { martial <= low_skill_rating } + add = 1 + } + # Low skill. + if = { + limit = { martial <= mediocre_skill_rating } + add = 1 + } + # High skill. + if = { + limit = { martial >= high_skill_rating } + add = -1 + } + # Excellent skill. + if = { + limit = { martial >= extremely_high_skill_rating } + add = -1 + } + } + } + # Stewardship. + else_if = { + limit = { scheme_skill = stewardship } + scope:owner = { + # Atrocious skill. + if = { + limit = { stewardship <= low_skill_rating } + add = 1 + } + # Low skill. + if = { + limit = { stewardship <= mediocre_skill_rating } + add = 1 + } + # High skill. + if = { + limit = { stewardship >= high_skill_rating } + add = -1 + } + # Excellent skill. + if = { + limit = { stewardship >= extremely_high_skill_rating } + add = -1 + } + } + } + # Intrigue. + else_if = { + limit = { scheme_skill = intrigue } + scope:owner = { + # Atrocious skill. + if = { + limit = { intrigue <= low_skill_rating } + add = 1 + } + # Low skill. + if = { + limit = { intrigue <= mediocre_skill_rating } + add = 1 + } + # High skill. + if = { + limit = { intrigue >= high_skill_rating } + add = -1 + } + # Excellent skill. + if = { + limit = { intrigue >= extremely_high_skill_rating } + add = -1 + } + } + } + # Learning. + else_if = { + limit = { scheme_skill = learning } + scope:owner = { + # Atrocious skill. + if = { + limit = { learning <= low_skill_rating } + add = 1 + } + # Low skill. + if = { + limit = { learning <= mediocre_skill_rating } + add = 1 + } + # High skill. + if = { + limit = { learning >= high_skill_rating } + add = -1 + } + # Excellent skill. + if = { + limit = { learning >= extremely_high_skill_rating } + add = -1 + } + } + } + # Prowess. + else_if = { + limit = { scheme_skill = prowess } + scope:owner = { + # Atrocious skill. + if = { + limit = { prowess <= low_skill_rating } + add = 1 + } + # Low skill. + if = { + limit = { prowess <= mediocre_skill_rating } + add = 1 + } + # High skill. + if = { + limit = { prowess >= high_skill_rating } + add = -1 + } + # Excellent skill. + if = { + limit = { prowess >= extremely_high_skill_rating } + add = -1 + } + } + } +} + +# What's the chance of no APA firing each month of a scheme? +scheme_apa_chance_of_no_event_value = 90 + +# Control values for scheme APAs. +## Positive. +scheme_apa_modifier_positive_success_chance_value = 5 +scheme_apa_modifier_positive_secrecy_value = 5 +scheme_apa_modifier_positive_speed_value = -5 +## Negative. +scheme_apa_modifier_negative_success_chance_value = -5 +scheme_apa_modifier_negative_secrecy_value = -5 +scheme_apa_modifier_negative_speed_value = 5 + +################################################## +# Countermeasure Values + +countermeasure_disliked_by_trait_agenthood_acceptance_value = 25 + +countermeasure_scheme_category_success_chance_bonus_against_minor_value = -50 +countermeasure_scheme_category_success_chance_bonus_against_medium_value = -100 +countermeasure_scheme_category_success_chance_bonus_against_major_value = -150 + +countermeasure_scheme_category_success_chance_malus_against_minor_value = 10 +countermeasure_scheme_category_success_chance_malus_against_medium_value = 15 +countermeasure_scheme_category_success_chance_malus_against_major_value = 25 + +countermeasure_apply_secrecy_maluses_value = { + # Minor bonus to detection. + if = { + limit = { + countermeasure_parametre_applies_againt_char_trigger = { + SCHEME_TARGET = scope:target + SCHEME_OWNER = scope:owner + PARAMETER = secrecy_vs_all_schemes_bonus_minor + } + } + add = { + value = countermeasure_apply_secrecy_maluse_minor_value + desc = countermeasures_in_target_court.tt.secrecy + } + } + # Medium bonus to detection. + if = { + limit = { + countermeasure_parametre_applies_againt_char_trigger = { + SCHEME_TARGET = scope:target + SCHEME_OWNER = scope:owner + PARAMETER = secrecy_vs_all_schemes_bonus_medium + } + } + add = { + value = countermeasure_apply_secrecy_maluse_medium_value + desc = countermeasures_in_target_court.tt.secrecy + } + } + # Major bonus to detection. + if = { + limit = { + countermeasure_parametre_applies_againt_char_trigger = { + SCHEME_TARGET = scope:target + SCHEME_OWNER = scope:owner + PARAMETER = secrecy_vs_all_schemes_bonus_major + } + } + add = { + value = countermeasure_apply_secrecy_maluse_major_value + desc = countermeasures_in_target_court.tt.secrecy + } + } +} + +# Lifestyle Perk +realm_charts_perk_value = 35 +secrecy_charting_realm_increase_value = { + if = { + limit = { + scope:owner = { + has_perk = realm_charts_perk + } + scope:target ?= { + top_liege = scope:owner.top_liege + } + } + add = { + value = realm_charts_perk_value + desc = realm_chart_perk_same_realm_secrecy + } + } +} + +# We use separate values so we can display them in loc too. +countermeasure_apply_secrecy_maluse_minor_value = -15 +countermeasure_apply_secrecy_maluse_medium_value = -25 +countermeasure_apply_secrecy_maluse_major_value = -35 + +# We use a script value instead of inline maths for this because for some reason _specifically_ the courtly and parochial vassal stances don't like in-line vassals. +dislikes_countermeasure_opinion_value = -30 +dislikes_countermeasure_opinion_lowered_value = -20 +dislikes_countermeasure_opinion_lowered_further_value = -10 +dislikes_countermeasure_county_opinion_value = -40 +dislikes_countermeasure_county_opinion_lowered_value = -30 +dislikes_countermeasure_county_opinion_lowered_further_value = -20 + +# Controls when the AI will and won't use certain countermeasures. +## Prioritise what values are active. +### These don't all need to be script values, I've only done it so that they're all grouped next to each other for easy visualisation. +countermeasure_ai_will_do_prio4 = 80 +countermeasure_ai_will_do_prio3 = 60 +countermeasure_ai_will_do_prio2 = 40 +countermeasure_ai_will_do_prio1 = 20 +### We originally had this lower but it causes maddening stretching in debug mode. +countermeasure_ai_will_do_prio0 = -20 +## Then we distribute these values out nicely between the different countermeasures. +ai_will_do_bounties_for_whispers_value = { + if = { + limit = { + should_ai_take_preemptive_countermeasures_trigger = yes + OR = { + has_trait = deceitful + has_trait = craven + } + NOR = { + has_trait = honest + has_trait = brave + has_trait = trusting + } + } + add = countermeasure_ai_will_do_prio1 + } + else = { add = countermeasure_ai_will_do_prio0 } +} +ai_will_do_arbitrary_arrests_value = { + if = { + limit = { + should_ai_take_preemptive_countermeasures_trigger = yes + OR = { + has_trait = arbitrary + has_trait = paranoid + } + NOR = { + has_trait = just + has_trait = trusting + } + } + add = countermeasure_ai_will_do_prio1 + } + else = { add = countermeasure_ai_will_do_prio0 } +} +ai_will_do_strengthen_sentries_value = { + if = { + limit = { + # Don't do this if we've already deployed countermeasures. + NOT = { has_scheme_countermeasure_parameter = has_aggressive_countermeasure_active } + # Then actually check to see if the scheme'd be appropriate for this. + any_targeting_scheme = { + is_scheme_exposed = yes + var:apply_countermeasures ?= flag:opportunistic + } + } + add = countermeasure_ai_will_do_prio3 + } + else = { add = countermeasure_ai_will_do_prio0 } +} +ai_will_do_strengthen_sentries_for_courtier_value = { + if = { + limit = { + any_in_list = { + variable = host_should_prevent_seduce_schemes_list + host ?= prev + } + } + add = countermeasure_ai_will_do_prio2 + } +} +ai_will_do_redouble_guards_value = { + if = { + limit = { + # We don't care about dpeloyed countermeasures here: guard against murders even if there's a seduction already happening. + any_targeting_scheme = { + is_scheme_exposed = yes + var:apply_countermeasures ?= flag:calculating + } + } + add = countermeasure_ai_will_do_prio4 + } + else = { add = countermeasure_ai_will_do_prio0 } +} +ai_will_do_redouble_guards_for_courtier_value = { + if = { + limit = { + any_in_list = { + variable = host_should_prevent_murder_schemes_list + host ?= prev + } + } + add = countermeasure_ai_will_do_prio2 + } +} +ai_will_do_withdraw_from_view_value = { + if = { + limit = { + any_targeting_scheme = { + is_scheme_exposed = yes + OR = { + var:apply_countermeasures ?= flag:calculating + var:apply_countermeasures ?= flag:opportunistic + } + } + OR = { + has_trait = humble + has_trait = shy + has_trait = eccentric + } + NOR = { + has_trait = arrogant + has_trait = gregarious + has_trait = stubborn + has_trait = trusting + } + } + add = countermeasure_ai_will_do_prio1 + } + else = { add = countermeasure_ai_will_do_prio0 } +} + +################################################## +# Murder Values + +# How much automatic stress loss do we give a character, before traits, upon successfully murdering someone? +murder_base_stress_value = { + # If our imaginary friend told us to do it, then we lose a lot. + if = { + limit = { scope:owner.var:imaginary_friend_murder_target ?= scope:target } + add = major_stress_impact_loss + } + # Or a moderate gain if we've been caught and this is our first time. + else_if = { + limit = { + exists = scope:scheme_discovered + NOT = { has_trait = murderer } + } + add = medium_stress_impact_gain + } + # Else we're a repeat offender, so we care less. + else_if = { + limit = { exists = scope:scheme_discovered } + add = minor_stress_impact_gain + } + # Otherwise, a moderate loss. + else = { add = medium_stress_impact_loss } +} + +# Which bodyguard is best poised to come to their liege's defence? +murder_weight_best_bodyguard_value = { + add = prowess + add = { + value = ai_boldness + # To bring us in line with skill scaling. + multiply = 0.25 + } + add = { + value = "opinion(scope:target)" + # To bring us roughly in line with skill scaling. + multiply = 0.25 + } + if = { + limit = { has_trait = loyal } + add = 25 + } +} + +# How much prestige do you get for successfully murdering a rival? +rival_outlived_prestige_value = medium_prestige_gain + +################################################## +# Odds Values + +base_odds_prediction_target_is_title_value = { + if = { + limit = { # Target is a landed title + exists = scope:target.holder + } + scope:target ?= { + holder = { save_temporary_scope_as = temp_target } + } + } + else_if = { # Title is a province + limit = { + exists = scope:target.province_owner + } + scope:target ?= { + province_owner = { save_temporary_scope_as = temp_target } + } + } + else_if = { # + limit = { + scope:target = { + any_de_jure_top_liege = { + exists = this + save_temporary_scope_as = de_jure_liege + } + } + } + scope:de_jure_liege = { + save_temporary_scope_as = temp_target + } + } + add = base_odds_prediction_guts_value +} + +base_odds_prediction_target_is_char_value = { + scope:target ?= { save_temporary_scope_as = temp_target } + add = base_odds_prediction_guts_value +} + +# For non-hostile, non-secret schemes (generally non-intrigue too). +base_odds_prediction_guts_value = { + add = { + value = { + scope:temp_target = { value = "opinion(scope:owner)" } + multiply = 0.2 + floor = yes + } + desc = scheme_odds.target.opinion_of_owner + } + add = { + value = { + value = scope:temp_target.highest_held_title_tier + # Barons aren't imposing at all. + add = -1 + # Don't give a bonus just for someone being a courtier and call it a tier thing. + min = 0 + } + desc = scheme_odds.target.tier + multiply = -5 + } + if = { + limit = { + scope:owner = { + exists = scope:temp_target.cp:councillor_spymaster + scope:temp_target.cp:councillor_spymaster = this + } + } + add = { + value = 12 + desc = scheme_odds.owner.is_target_spymaster + } + } + if = { + limit = { + scope:temp_target = { + is_landed_or_landless_administrative = no + } + scope:owner = { + exists = scope:temp_target.liege.cp:councillor_spymaster + scope:temp_target.liege.cp:councillor_spymaster = this + } + } + add = { + value = 8 + desc = scheme_odds.owner.is_target_liege_spymaster + } + } + if = { + limit = { + scope:temp_target = { + is_landed_or_landless_administrative = no + } + scope:owner = { + exists = scope:temp_target.host.cp:councillor_spymaster + scope:temp_target.host.cp:councillor_spymaster = this + } + } + add = { + value = 8 + desc = scheme_odds.owner.is_target_host_spymaster + } + } + if = { + limit = { + scope:owner = { + has_relation_guardian = scope:temp_target + } + } + add = { + value = 8 + desc = scheme_odds.owner.relation.owner_is_guardian_of_target + } + } + if = { + limit = { + scope:owner = { is_diarch_of_target = scope:temp_target } + } + add = { + value = 5 + desc = scheme_odds.owner.relation.owner_is_diarch_of_target + } + } + if = { + limit = { + scope:temp_target = { + is_ruler = no + } + exists = scope:temp_target.liege + scope:temp_target.liege = scope:owner + } + add = { + value = 10 + desc = scheme_odds.owner.relation.owner_is_liege_of_target + } + } + if = { + limit = { + scope:owner = { + is_councillor_of = scope:temp_target + } + } + add = { + value = 10 + desc = scheme_odds.owner.relation.owner_is_councillor_of_target + } + } + if = { + limit = { + scope:owner = { + has_relation_lover = scope:temp_target + } + } + add = { + value = 10 + desc = scheme_odds.owner.relation.owner_is_lover_of_target + } + } + if = { + limit = { + scope:owner = { + is_spouse_of = scope:temp_target + } + } + add = { + value = 10 + desc = scheme_odds.owner.relation.owner_is_spouse_of_target + } + } + if = { + limit = { + scope:owner = { + is_consort_of = scope:temp_target + NOT = { is_spouse_of = scope:temp_target } + } + } + add = { + value = 5 + desc = scheme_odds.owner.relation.owner_is_consort_of_target + } + } + if = { + limit = { + scope:owner = { + is_close_family_of = scope:temp_target + } + } + add = { + value = 5 + desc = scheme_odds.owner.relation.owner_is_close_family_of_target + } + } +} + +agent_groups_owner_perspective_value = { + scope:owner = { + # We need to check the any's here to avoid +0s if there's no valid chars. + if = { + limit = { + OR = { + any_courtier_or_guest = { is_valid_agent_standard_trigger = yes } + any_relation = { + type = friend + is_valid_agent_standard_trigger = yes + } + any_relation = { + type = lover + is_valid_agent_standard_trigger = yes + } + } + + } + add = { + value = 1 + multiply = { + value = 0 + if = { + limit = { + any_courtier_or_guest = { is_valid_agent_standard_trigger = yes } + } + every_courtier_or_guest = { + limit = { is_valid_agent_standard_trigger = yes } + add = 1 + } + } + if = { + limit = { + any_relation = { + type = friend + is_valid_agent_standard_trigger = yes + } + } + every_relation = { + type = friend + limit = { is_valid_agent_standard_trigger = yes } + add = 1 + } + } + if = { + limit = { + any_relation = { + type = lover + is_valid_agent_standard_trigger = yes + } + } + every_relation = { + type = lover + limit = { is_valid_agent_standard_trigger = yes } + add = 1 + } + } + max = 5 + } + desc = scheme_odds.agents.owner.number_of_valid_courtiers_agents + } + } + } +} + +agent_groups_target_character_perspective_value = { + if = { + limit = { + scope:scheme ?= { + is_scheme_target_type = title + } + } + scope:scheme ?= { + scheme_target_title.holder ?= { save_temporary_scope_as = target } + } + } + scope:target = { + # We need to check the any's here to avoid +0s if there's no valid chars. + if = { + limit = { + any_courtier = { is_valid_agent_standard_trigger = yes } + } + add = { + value = 3 + multiply = { + value = 0 + every_courtier = { + limit = { is_valid_agent_standard_trigger = yes } + add = 1 + } + max = 5 + } + desc = scheme_odds.agents.target.number_of_valid_courtiers_agents + } + } + if = { + limit = { + any_vassal = { is_valid_agent_standard_trigger = yes } + } + add = { + value = 2 + multiply = { + value = 0 + every_vassal = { + limit = { is_valid_agent_standard_trigger = yes } + add = 1 + } + max = 5 + } + desc = scheme_odds.agents.target.number_of_valid_vassal_agents + } + } + } +} + +hostile_scheme_base_odds_prediction_target_is_title_value = { + if = { + limit = { # Target is a landed title + exists = scope:target.holder + } + scope:target ?= { + holder = { save_temporary_scope_as = temp_target } + } + } + else_if = { # Title is a province + limit = { + exists = scope:target.province_owner + } + scope:target ?= { + province_owner = { save_temporary_scope_as = temp_target } + } + } + else_if = { # + limit = { + scope:target = { + any_de_jure_top_liege = { + exists = this + save_temporary_scope_as = de_jure_liege + } + } + } + scope:de_jure_liege = { + save_temporary_scope_as = temp_target + } + } + add = hostile_scheme_base_odds_prediction_guts_value +} + +hostile_scheme_base_odds_prediction_target_is_char_value = { + scope:target ?= { save_temporary_scope_as = temp_target } + add = hostile_scheme_base_odds_prediction_guts_value +} + +hostile_scheme_base_odds_prediction_guts_value = { + if = { + limit = { + exists = scope:temp_target.primary_title + scope:temp_target.primary_title.tier = tier_empire + } + add = { + value = -40 + desc = scheme_odds.target.tier + } + } + else_if = { + limit = { + exists = scope:temp_target.primary_title + scope:temp_target.primary_title.tier = tier_kingdom + } + add = { + value = -30 + desc = scheme_odds.target.tier + } + } + else_if = { + limit = { + exists = scope:temp_target.primary_title + scope:temp_target.primary_title.tier = tier_duchy + } + add = { + value = -20 + desc = scheme_odds.target.tier + } + } + + if = { # Minor Lifestyle Perk protection for Courtiers + limit = { + scope:temp_target = { + is_alive = yes + is_ruler = no + exists = court_owner + court_owner = { + has_perk = prepared_for_anything_perk + } + NOT = { court_owner = scope:owner } + NOT = { has_perk = prepared_for_anything_perk } + } + } + add = { + value = 0 + desc = scheme_odds.target.court_owner_has_prepared_for_anything_perk + subtract = prepared_for_anything_perk_secondary_percentage + } + } + if = { + limit = { # Bonus for murdering Pool characters, as you can't have agents against them + scope:temp_target = { + is_pool_character = yes + NOT = { intrigue >= very_high_skill_rating } + } + } + add = { + value = 25 + desc = scheme_odds.target.is_pool_char + } + } + + if = { # FP3 legacy track bonus for murdering dynasty members + limit = { + scope:temp_target = { + exists = dynasty + exists = scope:owner.dynasty + dynasty = scope:owner.dynasty + dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_2 } + } + } + add = { + value = 10 + desc = scheme_odds.owner.dynasty_legacy_kinslaying_bonus_from_fp3_khvarenah_legacy_2 + } + } + + if = { # Essentially the Base + limit = { + scope:owner = { + exists = scope:temp_target.cp:councillor_spymaster + scope:temp_target.cp:councillor_spymaster = this + } + } + add = { + value = 75 + desc = scheme_odds.owner.is_target_spymaster + } + } + if = { + limit = { + scope:temp_target = { + is_landed_or_landless_administrative = no + } + scope:owner = { + exists = scope:temp_target.liege.cp:councillor_spymaster + scope:temp_target.liege.cp:councillor_spymaster = this + } + } + add = { + value = 75 + desc = scheme_odds.owner.is_target_liege_spymaster + } + } + if = { + limit = { + scope:temp_target = { + is_landed_or_landless_administrative = no + } + scope:owner = { + exists = scope:temp_target.host.cp:councillor_spymaster + scope:temp_target.host.cp:councillor_spymaster = this + } + } + add = { + value = 75 + desc = scheme_odds.owner.is_target_host_spymaster + } + } + if = { + limit = { + scope:owner = { + has_relation_guardian = scope:temp_target + } + } + add = { + value = 75 + desc = scheme_odds.owner.relation.owner_is_guardian_of_target + } + } + if = { + limit = { + scope:owner = { is_diarch_of_target = scope:temp_target } + } + add = { + value = 50 + desc = scheme_odds.owner.relation.owner_is_diarch_of_target + } + } + if = { + limit = { + scope:temp_target = { + is_ruler = no + } + exists = scope:temp_target.liege + scope:temp_target.liege = scope:owner + } + add = { + value = 25 + desc = scheme_odds.owner.relation.owner_is_liege_of_target + } + } + if = { + limit = { + scope:owner = { + is_councillor_of = scope:temp_target + } + } + add = { + value = 15 + desc = scheme_odds.owner.relation.owner_is_councillor_of_target + } + } + if = { + limit = { + scope:owner = { + has_relation_lover = scope:temp_target + } + } + add = { + value = 15 + desc = scheme_odds.owner.relation.owner_is_lover_of_target + } + } + if = { + limit = { + scope:owner = { + is_spouse_of = scope:temp_target + } + } + add = { + value = 10 + desc = scheme_odds.owner.relation.owner_is_spouse_of_target + } + } + if = { + limit = { + scope:owner = { + is_consort_of = scope:temp_target + } + } + add = { + value = 5 + desc = scheme_odds.owner.relation.owner_is_consort_of_target + } + } + if = { + limit = { + scope:owner = { + is_close_family_of = scope:temp_target + } + } + add = { + value = 5 + desc = scheme_odds.owner.relation.owner_is_close_family_of_target + } + } + + # Vengeful Bonus + if = { + limit = { + scope:owner = { + has_trait = vengeful + OR = { + has_relation_rival = scope:temp_target + has_relation_nemesis = scope:temp_target + } + } + } + add = { + value = vengeful_scheme_success_chance_modifier + desc = scheme_odds.trait.owner.vengeful + } + } + # Paranoid Malus + if = { + limit = { + scope:temp_target ?= { + has_trait = paranoid + OR = { + has_relation_rival = scope:temp_target + has_relation_nemesis = scope:temp_target + } + } + } + add = { + value = -20 + desc = scheme_odds.trait.target.paranoid + } + } + + if = { + limit = { + scope:owner = { + culture = { + has_cultural_parameter = hostile_action_vs_rival_bonuses + } + OR = { + has_relation_rival = scope:temp_target + has_relation_nemesis = scope:temp_target + } + } + } + add = { + value = 15 + desc = scheme_odds.culture.owner.hostile_scheme_bonuses_vs_rivals + } + } + + if = { + limit = {# Culture Bonus + scope:owner = { + culture = { + has_cultural_parameter = hostile_scheme_success_chance_vs_spouse_penalty + } + is_spouse_of = scope:temp_target + } + } + add = { + value = -50 + desc = scheme_odds.culture.owner.hostile_scheme_maluses_vs_spouse + } + } + + # Difficulty + if = { + limit = { + has_game_rule = easy_difficulty + scope:owner = { + is_ai = yes + } + scope:temp_target = { + is_ai = no + } + } + add = { + value = -25 + desc = scheme_odds.game_difficulty.easy + } + } + + if = { + limit = { + has_game_rule = very_easy_difficulty + scope:owner = { + is_ai = yes + } + scope:temp_target = { + is_ai = no + } + } + add = { + value = -75 + desc = scheme_odds.game_difficult.very_easy + } + } + + # Struggle + if = { + limit = { + scope:owner = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = struggle_agents_less_likely_to_join_schemes + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:temp_target + } + } + } + } + add = { + value = -25 + desc = scheme_odds.struggle.owner.agents_less_likely_to_join_due_to_struggle_phase + } + } + ## court_events.3060 + if = { + limit = { + scope:owner = { has_character_modifier = spies_behind_every_corner_modifier } + } + add = { + value = 25 + desc = scheme_odds.owner.spies_behind_every_corner_modifier + } + } + if = { + limit = { + scope:temp_target = { has_character_modifier = spies_behind_every_corner_modifier } + } + add = { + value = 25 + desc = scheme_odds.target.spies_behind_every_corner_modifier + } + } +} + +odds_skill_contribution_diplomacy_value = { + add = { + value = scope:owner.diplomacy + desc = scheme_odds.diplomacy.owner + } + scope:target ?= { + add = { + value = scope:target.diplomacy + desc = scheme_odds.diplomacy.target + multiply = -0.5 + } + } +} +odds_skill_contribution_martial_value = { + add = { + value = scope:owner.martial + desc = scheme_odds.martial.owner + } + scope:target ?= { + add = { + value = scope:target.martial + desc = scheme_odds.martial.target + multiply = -0.5 + } + } +} +odds_skill_contribution_stewardship_value = { + add = { + value = scope:owner.stewardship + desc = scheme_odds.stewardship.owner + } + scope:target ?= { + add = { + value = scope:target.stewardship + desc = scheme_odds.stewardship.target + multiply = -0.5 + } + } +} +odds_skill_contribution_intrigue_value = { + add = { + value = scope:owner.intrigue + desc = scheme_odds.intrigue.owner + } + scope:target ?= { + add = { + value = scope:target.intrigue + desc = scheme_odds.intrigue.target + multiply = -0.5 + } + } +} +odds_skill_contribution_learning_value = { + add = { + value = scope:owner.learning + desc = scheme_odds.learning.owner + } + + scope:target ?= { + add = { + value = scope:target.learning + desc = scheme_odds.learning.target + multiply = -0.5 + } + } +} +odds_skill_contribution_prowess_value = { + add = { + value = scope:owner.prowess + desc = scheme_odds.prowess.owner + } + scope:target ?= { + add = { + value = scope:target.prowess + desc = scheme_odds.prowess.target + multiply = -0.5 + } + } +} + +odds_skill_contribution_learning_target_is_title_value = { + add = { + value = scope:owner.learning + desc = scheme_odds.learning.owner + } + + scope:target ?= { + add = { + value = scope:target.holder.learning + desc = scheme_odds.learning.target + multiply = -0.5 + } + } +} + +odds_sway_scheme_misc_value = { + add = { + value = 30 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:owner = { knows_language_of_culture = scope:target.culture } + } + add = 4 + } + if = { + limit = { + scope:owner = { has_trait = diplomat } + } + add = 2 + } + if = { + limit = { + scope:owner = { is_adult = no } + } + add = -6 + } + if = { + limit = { + scope:target = { + has_opinion_modifier = { + target = scope:owner + modifier = scheme_sway_opinion + value >= 25 + } + } + } + add = -12 + } + if = { + limit = { + NOT = { scope:target.top_liege = scope:owner.top_liege } + } + add = -16 + } + if = { + limit = { + scope:target = { + personal_scheme_success_compare_target_liege_tier_trigger = no + } + scope:owner = { + tier_difference = { + target = scope:target + value >= 1 + } + } + } + add = 6 + } + if = { + limit = { + scope:target = { + personal_scheme_success_compare_target_liege_tier_trigger = no + } + scope:owner = { + tier_difference = { + target = scope:target + value <= -1 + } + } + } + add = -14 + } + if = { + limit = { + scope:target = { + is_theocratic_lessee = yes + } + scope:owner.piety_level < 0 + } + add = -50 + } + if = { + limit = { + scope:target = { + is_theocratic_lessee = yes + } + scope:owner.piety_level > 1 + } + add = 12 + } + if = { + limit = { + scope:target = { + faith = scope:owner.faith + faith = { + exists = religious_head + religious_head = { + this = scope:target + } + } + } + } + add = -50 + } + } +} + +odds_steal_back_artifact_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:owner = { + any_character_task_contract = { + has_task_contract_type = laamp_steal_artifact_contract + var:task_contract_target ?= scope:target + } + } + } + add = 14 + } + if = { + limit = { + scope:owner = { has_character_modifier = hostile_schemes_distracted_modifier } + } + add = -6 + } + } +} + +odds_slander_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:target = { + faith = scope:owner.faith + faith = { + has_doctrine = doctrine_spiritual_head + } + faith = { + exists = religious_head + religious_head = { + this = scope:target + } + } + } + } + add = -26 + } + if = { + limit = { + scope:target = { + exists = inspiration + inspiration = { exists = inspiration_sponsor} + } + } + add = -17 + } + if = { + limit = { + scope:owner = { has_character_modifier = poet_for_diplo_schemes_modifier } + } + add = 11 + } + if = { + limit = { + scope:owner = { + has_character_modifier = united_political_agents_modifier + is_vassal_of = scope:target + } + } + add = 13 + } + } +} + +odds_seize_realm_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:target = { + has_opinion_modifier = { + target = scope:owner + modifier = attempted_to_seize_my_realm_crime + } + } + } + add = -50 + } + if = { + limit = { + scope:target.inspiration ?= { exists = inspiration_sponsor } + } + add = -22 + } + if = { + limit = { + scope:target.faith = { + this = scope:owner.faith + has_doctrine = doctrine_spiritual_head + religious_head ?= scope:target + } + } + add = -50 + } + if = { + limit = { + OR = { + scope:target = { is_at_war_with = scope:owner } + scope:target = { + is_playable_character = no + liege ?= { is_at_war_with = scope:owner } + } + scope:target = { + is_playable_character = yes + liege ?= { is_at_war_with = scope:owner } + } + } + } + add = -22 + } + if = { + limit = { + scope:owner = { + has_character_modifier = tournament_tailor_mixup_scheme_modifier + exists = var:tailor_mixup_house + exists = scope:target.holder.house + var:tailor_mixup_house = scope:target.holder.house + } + } + add = 8 + } + if = { + limit = { + scope:owner = { + any_scheme = { + scheme_type = murder + scheme_target_character = scope:target + has_scheme_modifier = feast_learnt_habits_modifier + } + } + } + add = 8 + } + if = { + limit = { + scope:target = { has_character_modifier = fp3_struggle_caliph_super_suspicious_modifier } + } + add = -200 + } + } +} + +odds_seduce_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:owner = { + exists = var:wnight_seduce_memento_var + var:wnight_seduce_memento_var = scope:target + } + } + add = 14 + } + if = { + limit = { + scope:owner = { knows_language_of_culture = scope:target.culture } + } + add = 4 + } + if = { + limit = { + scope:owner = { has_perk = home_advantage_perk } + scope:target = { + OR = { + is_courtier_of = scope:owner + is_pool_guest_of = scope:owner + is_foreign_court_guest_of = scope:owner + } + } + } + add = home_advantage_perk_bonus + } + if = { + limit = { + scope:owner = { has_perk = smooth_operator_perk } + } + add = smooth_operator_perk_bonus + } + if = { + limit = { + scope:owner = { + exists = dynasty + dynasty = { + has_dynasty_perk = fp1_adventure_legacy_2 + } + } + } + add = fp1_adventure_legacy_2_success_chance_seduction + } + if = { + limit = { + scope:owner = { has_trait = seducer } + } + add = 16 + } + if = { + limit = { + OR = { + scope:owner = { has_trait = beauty_good_1 } + scope:owner = { has_trait = beauty_good_2 } + scope:owner = { has_trait = beauty_good_3 } + } + } + add = 12 + } + if = { + limit = { + OR = { + scope:owner = { has_trait = physique_good_1 } + scope:owner = { has_trait = physique_good_2 } + scope:owner = { has_trait = physique_good_3 } + } + } + add = 11 + } + if = { + limit = { + OR = { + scope:owner = { has_trait = beauty_bad_1 } + scope:owner = { has_trait = beauty_bad_2 } + scope:owner = { has_trait = beauty_bad_3 } + } + } + add = -21 + } + if = { + limit = { + OR = { + scope:owner = { has_trait = great_pox } + scope:owner = { has_trait = lovers_pox } + scope:owner = { has_trait = early_great_pox } + } + } + add = -17 + } + if = { + limit = { + scope:owner = { + NOR = { + is_attracted_to_gender_of = scope:target + has_perk = unshackled_lust_perk + } + } + } + add = -15 + } + if = { + limit = { + scope:target = { has_trait = lifestyle_reveler } + } + add = 3 + } + if = { + limit = { + scope:target = { has_trait = lustful } + } + add = 7 + } + if = { + limit = { + scope:target = { has_trait = chaste } + } + add = -18 + } + if = { + limit = { + scope:target = { has_trait = shy } + } + add = -7 + } + if = { + limit = { + scope:owner = { is_consort_of = scope:target } + } + add = 14 + } + if = { + limit = { + scope:target = { + is_married = yes + NOT = { is_consort_of = scope:owner } + ai_honor >= high_positive_ai_value + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = scope:target.faith GENDER_CHARACTER = scope:target } + } + } + add = -50 + } + if = { + limit = { + scope:target = { + is_married = yes + NOT = { is_consort_of = scope:owner } + exists = primary_spouse + primary_spouse = { save_temporary_scope_as = target_spouse } + NOT = { might_cheat_on_partner_trigger = { PARTNER = scope:target_spouse }} + } + } + add = -100 + } + if = { + limit = { + scope:owner = { NOT = { is_consort_of = scope:target } } + scope:target = { + is_married = yes + exists = primary_spouse + primary_spouse = { save_temporary_scope_as = target_spouse } + opinion = { + target = scope:target_spouse + value < low_negative_opinion + } + } + } + add = 18 + } + if = { + limit = { + scope:target = { + faith = scope:owner.faith + faith = { + exists = religious_head + religious_head = { + this = scope:target + } + } + } + } + add = -50 + } + if = { + limit = { + scope:target = { + relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } + } + scope:owner = { # The Subtle Desire Perk nullifies this + NOT = { has_perk = subtle_desire_perk } + } + } + add = -22 + } + if = { + limit = { + scope:target = { + NOT = { is_consort_of = scope:owner } + is_close_or_extended_family_of = scope:owner + NOR = { + accepts_incest_with_trigger = { CHARACTER = scope:owner } #100% fine with incest with owner + scope:owner = { has_perk = subtle_desire_perk } # The Subtle Desire Perk nullifies this + guaranteed_under_20_incest_rejection_trigger = { # handled by hard block modifier + TARGET = scope:target + SEDUCER = scope:owner + } + } + } + } + add = -16 + } + if = { + limit = { + scope:target = { + personal_scheme_success_compare_target_liege_tier_trigger = no + } + scope:owner = { + tier_difference = { + target = scope:target + value >= 1 + } + } + } + add = 12 + } + if = { + limit = { + scope:target = { + personal_scheme_success_compare_target_liege_tier_trigger = no + } + scope:owner = { + tier_difference = { + target = scope:target + value <= -1 + } + } + } + add = -40 + } + if = { + limit = { + scope:target = { + trait_compatibility = { + target = scope:owner + value >= medium_positive_trait_compatibility + } + } + } + add = 18 + } + if = { + limit = { + scope:target = { + trait_compatibility = { + target = scope:owner + value <= medium_negative_trait_compatibility + } + } + } + add = -36 + } + } +} + +odds_promote_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + exists = scope:owner.dynasty + scope:owner.dynasty = { + has_dynasty_perk = kin_legacy_4 + } + scope:target.dynasty = scope:owner.dynasty + } + add = kin_legacy_4_success_chance + } + if = { + limit = { + exists = scope:owner.house + exists = scope:target.house + scope:owner.culture = { + has_cultural_parameter = cultural_house_personal_scheme_success_chance + } + scope:target.house = scope:owner.house + } + add = cultural_house_personal_scheme_success_chance + } + if = { + limit = { + scope:owner = { has_character_modifier = poet_for_diplo_schemes_modifier } + } + add = 8 + } + if = { + limit = { + scope:owner = { + has_variable_list = supporting_political_schemes + } + } + add = 7 + } + } +} + +odds_murder_scheme_misc_value = { + add = { + value = -17 + desc = scheme_odds.misc_modifiers + if = { + limit = { + OR = { + scope:target = { + is_at_war_with = scope:owner + } + scope:target = { + is_playable_character = no + exists = liege + liege = { + is_at_war_with = scope:owner + } + } + scope:target = { + is_playable_character = yes + exists = liege + liege = { + is_at_war_with = scope:owner + } + } + } + } + add = -30 + } + if = { + limit = { + scope:target = { + faith = scope:owner.faith + faith = { + has_doctrine = doctrine_spiritual_head + } + faith = { + exists = religious_head + religious_head = { + this = scope:target + } + } + } + } + add = -50 + } + if = { + limit = { + scope:target = { + has_opinion_modifier = { + target = scope:owner + modifier = attempted_murder_me_crime + } + } + } + add = -50 + } + if = { + limit = { + scope:target = { + has_perk = prepared_for_anything_perk + } + } + add = -26 + } + if = { + limit = { + scope:target = { + has_character_modifier = fp3_struggle_caliph_super_suspicious_modifier + } + } + add = -18 + } + if = { + limit = { + scope:target = { + has_trait = trusting + } + } + add = 18 + } + } + +} + +odds_learn_language_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:owner.piety_level > 0 + scope:owner.culture = { + has_cultural_parameter = language_success_chance_per_piety_level + } + } + add = 4 + } + if = { + limit = { + exists = scope:owner.cp:councillor_court_chaplain + scope:owner.cp:councillor_court_chaplain.learning > 10 + } + add = 3 + } + if = { + limit = { + scope:owner.age < 30 + } + add = 8 + } + if = { + limit = { + scope:target.culture = { + has_same_culture_heritage = scope:owner.culture + } + } + add = 3 + } + if = { + limit = { + scope:owner = { + has_perk = pedagogy_perk + } + } + add = 4 + } + if = { + limit = { + scope:owner = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + has_trait = stubborn + has_trait = ambitious + } + } + add = 4 + } + } + +} + +odds_generate_claim_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + exists = scope:target.holder + scope:owner = { + faith = { + exists = religious_head + has_doctrine = doctrine_spiritual_head + religious_head = { + this = scope:target.holder + } + } + } + } + add = -50 + } + if = { + limit = { + scope:owner = { + has_trait = deceitful + } + } + add = -18 + } + if = { + limit = { + scope:owner = { + has_trait = honest + } + } + add = -16 + } + if = { + limit = { + scope:target.holder ?= { + has_trait = trusting + } + } + add = 8 + } + } + +} + +odds_foster_legitimacy_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:owner = { + has_trait = overseer + } + } + add = 8 + } + if = { + limit = { + scope:owner = { has_character_modifier = poet_for_diplo_schemes_modifier } + } + add = 8 + } + } + +} + +odds_fabricate_hook_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:owner = { + has_trait = deceitful + } + } + add = 8 + } + if = { + limit = { + scope:target = { + OR = { + has_trait = trusting + has_trait = intellect_bad_1 + has_trait = intellect_bad_2 + has_trait = intellect_bad_3 + has_trait = arrogant + has_trait = greedy + has_trait = craven + } + } + } + add = 8 + } + if = { + limit = { + scope:target = { + OR = { + has_trait = fickle + has_trait = paranoid + has_trait = schemer + has_trait = intellect_good_3 + has_trait = intellect_good_2 + has_trait = intellect_good_1 + } + } + } + add = -22 + } + if = { + limit = { + scope:target = { + faith = scope:owner.faith + faith = { + has_doctrine = doctrine_spiritual_head + } + faith = { + exists = religious_head + religious_head = { + this = scope:target + } + } + } + } + add = -50 + } + } + +} + +odds_ep3_teach_governor_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + add = { + value = scope:owner.age + add = { + value = scope:target.age + multiply = -1 + } + } + if = { + limit = { + scope:owner = { + NOR = { + has_trait = governor + has_trait = lazy + has_trait = diligent + } + } + } + add = -11 + } + if = { + limit = { + scope:target = { + trait_compatibility = { + target = scope:owner + value >= medium_positive_trait_compatibility + } + } + } + add = 9 + } + if = { + limit = { + scope:target = { + trait_compatibility = { + target = scope:owner + value <= medium_negative_trait_compatibility + } + } + } + add = -18 + } + } + +} + +odds_subsume_province_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:owner = { + any_sub_realm_county = { + NOT = { target_is_de_facto_liege_or_above = scope:owner.primary_title } + } + + } + } + add = -9 + } + if = { + limit = { + scope:owner.house = { + is_powerful_family = yes + is_dominant_family = no + } + } + add = 8 + } + if = { + limit = { + scope:target.holder.house = { + is_powerful_family = yes + is_dominant_family = no + } + } + add = -16 + } + add = { + value = scope:owner.influence_level + multiply = 2 + } + add = { + value = scope:target.holder.influence_level + multiply = -4 + } + if = { + limit = { + scope:target.holder.house = scope:owner.top_liege.house + } + add = -12 + } + } + +} + +odds_raid_estate_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + add = { + value = scope:owner.influence_level + multiply = 2 + } + add = { + value = scope:target.holder.influence_level + multiply = -4 + } + if = { + limit = { + scope:target.holder.house = scope:owner.top_liege.house + } + add = -12 + } + if = { + limit = { + scope:owner.house = { + is_powerful_family = yes + is_dominant_family = no + } + } + add = 8 + } + if = { + limit = { + scope:target.holder.house = { + is_powerful_family = yes + is_dominant_family = no + } + } + add = -16 + } + if = { + limit = { + scope:target.domicile = { + OR = { + has_domicile_building_or_higher = barracks_01 + has_domicile_building_or_higher = guardhouse_01 + has_domicile_building_or_higher = watchtower_01 + has_domicile_building_or_higher = estate_main_02 + } + } + } + add = -4 + } + if = { + limit = { + scope:target.domicile = { + OR = { + has_domicile_building_or_higher = barracks_03 + has_domicile_building_or_higher = guardhouse_03 + has_domicile_building_or_higher = watchtower_03 + has_domicile_building_or_higher = estate_main_04 + } + } + } + add = -12 + } + } +} + +odds_prepare_fire_dromons_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + add = { + value = scope:owner.influence_level + multiply = 2 + } + } +} + +odds_ingratiate_family_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:target = { + trait_compatibility = { + target = scope:owner + value >= medium_positive_trait_compatibility + } + } + } + add = 6 + } + if = { + limit = { + scope:target = { + trait_compatibility = { + target = scope:owner + value <= medium_negative_trait_compatibility + } + } + } + add = -12 + } + if = { + limit = { + scope:target = { + personal_scheme_success_compare_target_liege_tier_trigger = no + } + scope:owner = { + tier_difference = { + target = scope:target + value >= 1 + } + } + } + add = 8 + } + if = { + limit = { + scope:target = { + personal_scheme_success_compare_target_liege_tier_trigger = no + } + scope:owner = { + tier_difference = { + target = scope:target + value <= -1 + } + } + } + add = -14 + } + if = { + limit = { + scope:owner.house = { is_dominant_family = yes } + } + add = 6 + } + if = { + limit = { + scope:owner.dynasty = scope:target.dynasty + } + add = 8 + } + } +} + +odds_found_despotate_scheme_misc_value = { + add = { + value = -6 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:owner.house = { + is_powerful_family = yes + is_dominant_family = no + } + } + add = 6 + } + if = { + limit = { + scope:owner.house = { is_dominant_family = yes } + } + add = 8 + } + if = { + limit = { + scope:owner.top_liege.capital_county.kingdom ?= scope:target + } + add = -12 + } + } +} + +odds_diarch_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + add = { + value = scope:target.strife_opinion + multiply = 0.25 + min = 5 + max = 40 + } + } + +} + +odds_depose_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:target = { + faith = scope:owner.faith + faith = { + has_doctrine = doctrine_spiritual_head + } + faith = { + exists = religious_head + religious_head = { + this = scope:target + } + } + } + } + add = -28 + } + if = { + limit = { + scope:owner.house = { is_dominant_family = yes } + } + add = 8 + } + } + +} + +odds_befriend_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:owner = { + knows_language_of_culture = scope:target.culture + } + } + add = 6 + } + if = { + limit = { + scope:owner = { + OR = { + has_trait = education_diplomacy_1 + has_trait = education_diplomacy_2 + has_trait = education_diplomacy_3 + has_trait = education_diplomacy_4 + has_trait = education_diplomacy_5 + } + } + } + add = 6 + } + if = { + limit = { + scope:owner = { + OR = { + has_trait = diplomat + has_trait = august + has_trait = lifestyle_reveler + } + } + } + add = 12 + } + if = { + limit = { + scope:owner = { + has_trait = shy + has_trait = callous + } + } + add = -8 + } + if = { + limit = { + scope:target = { + has_trait = shy + has_trait = callous + has_trait = paranoid + } + } + add = -12 + } + if = { + limit = { + scope:target = { + trait_compatibility = { + target = scope:owner + value >= medium_positive_trait_compatibility + } + } + } + add = 14 + } + if = { + limit = { + scope:target = { + trait_compatibility = { + target = scope:owner + value <= medium_negative_trait_compatibility + } + } + } + add = -26 + } + if = { + limit = { + scope:target = { + personal_scheme_success_compare_target_liege_tier_trigger = no + } + scope:owner = { + tier_difference = { + target = scope:target + value >= 1 + } + } + } + add = 14 + } + if = { + limit = { + scope:target = { + personal_scheme_success_compare_target_liege_tier_trigger = no + } + scope:owner = { + tier_difference = { + target = scope:target + value <= -1 + } + } + } + add = -16 + } + if = { + limit = { + scope:owner = { has_relation_rival = scope:target } + } + add = -24 + } + } +} + +odds_abduct_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + if = { + limit = { + scope:target = { + personal_scheme_success_compare_target_liege_tier_trigger = no + } + scope:owner = { + tier_difference = { + target = scope:target + value >= 1 + } + } + } + add = 14 + } + if = { + limit = { + scope:target = { + personal_scheme_success_compare_target_liege_tier_trigger = no + } + scope:owner = { + tier_difference = { + target = scope:target + value <= -1 + } + } + } + add = -16 + } + if = { # Foreign Rulers are very hard to kidnap + limit = { + scope:target = { + OR = { + is_ruler = yes + is_foreign_court_or_pool_guest = no + } + NOT = { + scope:target.top_liege = scope:owner.top_liege + } + } + } + add = -25 + } + if = { # Rulers are harder to kidnap + limit = { + scope:target = { + is_ruler = yes + scope:target.top_liege = scope:owner.top_liege + } + } + add = -10 + } + } +} + +odds_romance_scheme_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + # Thicker Than Water Perk + if = { + limit = { + scope:owner = { + has_perk = thicker_than_water_perk + } + scope:target = { + is_close_or_extended_family_of = scope:owner + } + } + add = 5 + } + if = { # Tradition + limit = { + scope:owner = { + has_trait = poet + culture = { + has_cultural_parameter = poet_trait_romance_bonuses + } + } + } + add = 8 + } + # You are a Courteous Knight + if = { + limit = { + scope:owner = { + has_character_modifier = ep3_courteous_knight_modifier + } + } + add = 5 + } + if = { + limit = { + scope:owner = { has_perk = home_advantage_perk } + scope:target = { + OR = { + is_courtier_of = scope:owner + is_pool_guest_of = scope:owner + is_foreign_court_guest_of = scope:owner + } + } + } + add = 10 + } + if = { + limit = { + scope:owner = { has_perk = courtship_perk } + } + add = 5 + } + if = { + limit = { + scope:owner = { + is_spouse_of = scope:target + } + scope:owner.culture = { + has_cultural_parameter = romance_scheme_bonus_vs_spouse + } + } + add = 5 + } + if = { + limit = { + scope:owner = { knows_language_of_culture = scope:target.culture } + } + add = 4 + } + if = { + limit = { + scope:owner.dynasty ?= { + has_dynasty_perk = kin_legacy_4 + } + scope:target.dynasty ?= scope:owner.dynasty + } + add = 5 + } + + if = { + limit = { + exists = scope:owner.house + exists = scope:target.house + scope:owner.culture = { + has_cultural_parameter = cultural_house_personal_scheme_success_chance + } + scope:target.house = scope:owner.house + } + add = 5 + } + if = { + limit = { + scope:owner = { has_trait = gallant } + } + add = 16 + } + if = { + limit = { + OR = { + scope:owner = { has_trait = beauty_good_1 } + scope:owner = { has_trait = beauty_good_2 } + scope:owner = { has_trait = beauty_good_3 } + } + } + add = 12 + } + if = { + limit = { + OR = { + scope:owner = { has_trait = physique_good_1 } + scope:owner = { has_trait = physique_good_2 } + scope:owner = { has_trait = physique_good_3 } + } + } + add = 11 + } + if = { + limit = { + OR = { + scope:owner = { has_trait = beauty_bad_1 } + scope:owner = { has_trait = beauty_bad_2 } + scope:owner = { has_trait = beauty_bad_3 } + } + } + add = -21 + } + if = { + limit = { + OR = { + scope:owner = { has_trait = great_pox } + scope:owner = { has_trait = lovers_pox } + scope:owner = { has_trait = early_great_pox } + } + } + add = -17 + } + if = { + limit = { + scope:owner = { + NOR = { + is_attracted_to_gender_of = scope:target + has_perk = unshackled_lust_perk + } + } + } + add = -15 + } + if = { + limit = { + scope:target = { + relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } + } + scope:owner = { # The Subtle Desire Perk nullifies this + NOT = { has_perk = subtle_desire_perk } + } + } + add = -22 + } + if = { + limit = { + scope:target = { + NOT = { is_consort_of = scope:owner } + is_close_or_extended_family_of = scope:owner + NOR = { + accepts_incest_with_trigger = { CHARACTER = scope:owner } #100% fine with incest with owner + scope:owner = { has_perk = subtle_desire_perk } # The Subtle Desire Perk nullifies this + guaranteed_under_20_incest_rejection_trigger = { # handled by hard block modifier + TARGET = scope:target + SEDUCER = scope:owner + } + } + } + } + add = -16 + } + if = { + limit = { + scope:target = { + personal_scheme_success_compare_target_liege_tier_trigger = no + } + scope:owner = { + tier_difference = { + target = scope:target + value >= 1 + } + } + } + add = 12 + } + if = { + limit = { + scope:target = { + personal_scheme_success_compare_target_liege_tier_trigger = no + } + scope:owner = { + tier_difference = { + target = scope:target + value <= -1 + } + } + } + add = -40 + } + if = { + limit = { + scope:target = { + trait_compatibility = { + target = scope:owner + value >= medium_positive_trait_compatibility + } + } + } + add = 18 + } + if = { + limit = { + scope:target = { + trait_compatibility = { + target = scope:owner + value <= medium_negative_trait_compatibility + } + } + } + add = -36 + } + } +} + +odds_convert_to_witchcraft_misc_value = { + add = { + value = 0 + desc = scheme_odds.misc_modifiers + add = { + value = { + scope:target = { value = "opinion(scope:owner)" } + multiply = 0.2 + floor = yes + } + } + if = { + limit = { + scope:owner = { + exists = house + house = { has_house_modifier = witch_coven } + } + } + add = 4 + } + add = { + value = scope:target.ai_zeal + multiply = -1 + max = 50 + min = -50 + } + + #Attraction + if = { + limit = { + scope:target = { is_attracted_to_gender_of = scope:owner } + } + add = 5 + } + + #Target traits + if = { + limit = { + scope:target = { + has_trait = zealous + NOR = { + faith = { + trait_is_virtue = witch + has_doctrine_parameter = witchcraft_accepted + } + } + } + } + add = -10 + } + + if = { + limit = { + scope:target = { + has_trait = devoted + NOR = { + faith = { + trait_is_virtue = witch + has_doctrine_parameter = witchcraft_accepted + } + } + } + } + add = -6 + } + + if = { + limit = { + scope:target = { + has_trait = order_member + NOR = { + faith = { + trait_is_virtue = witch + has_doctrine_parameter = witchcraft_accepted + } + } + } + } + add = -6 + } + + if = { + limit = { + scope:target = { + OR = { + has_trait = craven + has_trait = paranoid + } + } + } + add = -8 + } + + if = { + limit = { + scope:target = { + OR = { + has_trait = lifestyle_reveler + has_trait = seducer + has_trait = lifestyle_mystic + has_trait = lifestyle_herbalist + has_trait = lustful + has_trait = deceitful + has_trait = ambitious + has_trait = trusting + has_trait = excommunicated + } + } + } + add = 8 + } + + if = { + limit = { + scope:target = { has_intrigue_lifestyle_trait_trigger = yes } + } + add = 4 + } + + if = { + limit = { + scope:target = { + has_trait = cynical + NOT = { + faith = { trait_is_virtue = witch } + } + } + } + add = 2 + } + + # House Personal Scheme Success Chance on Cultural Parameter + if = { + limit = { + exists = scope:owner.house + exists = scope:target.house + scope:owner.culture = { + has_cultural_parameter = cultural_house_personal_scheme_success_chance + } + scope:target.house = scope:owner.house + } + add = 5 + } + + # Modifiers + # house_head_request_interaction + if = { + limit = { + scope:owner = { + has_variable_list = supporting_personal_schemes + } + } + add = 2 + } + if = { + limit = { + scope:owner = { has_character_modifier = personal_schemes_distracted_modifier } + } + add = -2 + } + # Estate + if = { + limit = { + scope:owner.domicile ?= { + has_domicile_parameter = increased_success_personal_schemes_1 + } + } + add = 2 + } + if = { + limit = { + scope:owner.domicile ?= { + has_domicile_parameter = increased_success_personal_schemes_2 + } + } + add = 4 + } + if = { + limit = { + scope:owner.domicile ?= { + has_domicile_parameter = increased_success_personal_schemes_3 + } + } + add = 6 + } + } +} diff --git a/common/script_values/00_visit_settlement_values.txt b/common/script_values/00_visit_settlement_values.txt new file mode 100644 index 00000000..0fb7705b --- /dev/null +++ b/common/script_values/00_visit_settlement_values.txt @@ -0,0 +1,63 @@ + +visit_settlement_minimum_cooldown_days = 90 #3 months +visit_settlement_minimum_cooldown_months = 3 #Sync with visit_settlement_minimum_cooldown_days +visit_settlement_small_cooldown_days = 180 #6 months +visit_settlement_small_cooldown_months = 6 #Sync with visit_settlement_small_cooldown_days +visit_settlement_medium_cooldown_days = 365 #1 year +visit_settlement_medium_cooldown_year = 1 #Sync with visit_settlement_medium_cooldown_days +visit_settlement_cooldown_days = 730 #2 years +visit_settlement_large_cooldown_days = 1460 #4 years + +num_contracts_spawned_value = 2 + +old_adventurer_stashed_gold_value = 50 +old_adventurer_stashed_provisions_value = 1000 + +many_followers_value = 15 + +visit_settlement_provision_refill_value = { + value = provision_refill_value + multiply = 1.5 +} + +#Provisions split into percentages, steps of 20% +twenty_percent_provisions_value = { + value = max_provisions + multiply = 0.2 +} +forty_percent_provisions_value = { + value = max_provisions + multiply = 0.4 +} +sixty_percent_provisions_value = { + value = max_provisions + multiply = 0.6 +} +eighty_percent_provisions_value = { + value = max_provisions + multiply = 0.8 +} + +#Used to calculate quarter of the provisions needed for you to reach max provisions, maxed at 2000 +quarter_to_max_provisions_value = { + value = root.domicile.max_provisions + subtract = root.domicile.provisions + divide = 4 + max = 2000 +} + +#Used to calculate half of the provisions needed for you to reach max provisions +half_to_max_provisions_value = { + value = root.domicile.max_provisions + subtract = root.domicile.provisions + divide = 2 +} + +visit_settlement_skill_gain_cap_value = 5 + +laamp_ai_spending_pants_value = 500 + +visit_settlement_piety_gain_value = { + value = major_piety_gain + divide = root.var:visit_settlement_church_donation +} \ No newline at end of file diff --git a/common/script_values/00_war_values.txt b/common/script_values/00_war_values.txt new file mode 100644 index 00000000..ca23c677 --- /dev/null +++ b/common/script_values/00_war_values.txt @@ -0,0 +1,914 @@ +############## +# WAR VALUES # +############## + +# Truce Durations +## Since we want these to work out to nice, even numbers, we calc them manually rather than use multipliers. +standard_truce_duration_days = { + value = 1825 + # Deductions. + ## Flexible truces perk. + if = { + limit = { + scope:attacker = { has_perk = flexible_truces_perk } + } + add = -450 + } + ## Certain struggle phases. + if = { + limit = { + scope:attacker = { + any_character_struggle = { + is_struggle_parameter_active_secondary_character_involvement_either_trigger = { + PARAMETER = truces_by_involved_or_interlopers_within_region_shorter + CHAR = scope:defender + } + } + } + } + add = -900 + } + if = { + limit = { + scope:attacker = { + any_character_struggle = { + is_struggle_parameter_active_secondary_character_involvement_either_trigger = { + PARAMETER = truces_by_involved_or_interlopers_within_region_longer + CHAR = scope:defender + } + } + } + } + add = 900 + } + # A truce should at least give a 2-year breather. + min = 730 + if = { + limit = { + scope:attacker = { + any_character_war = { + primary_attacker = scope:attacker + primary_defender = scope:defender + using_cb = fp2_border_raid + } + } + } + multiply = 2 + } +} + +#Victory Prestige Experience Gain +mongol_invasion_cb_prestige_experience_gain = 10 + +#Ally contribution prestige gain +mongol_invasion_cb_ally_prestige = 100 + +#Prestige gain +mongol_invasion_cb_prestige_gain = 250 + +#White peace prestige values +mongol_invasion_cb_prestige_white_peace = -100 + +# Determined Independence Cultural Tradition +determined_independence_defensive_advantage_value = 15 + +############# +# Raid +############# + +# Practiced Pirates Cultural Tradition +not_tribal_raid_prestige_multiplier = 1.5 + +raid_gold_value = { #How much cash does this settlement generate in a raid? + value = monthly_income + multiply = 10 + + #Sensible max-mins. + min = 30 + max = 100 + + #Give a whole number. + ceiling = yes +} + +tour_tax_gold_value = { + value = monthly_income + multiply = 4 + + #Give a whole number. + ceiling = yes +} + +viking_conquest_ai_score_value = { + value = 1 + scope:attacker = { + if = { + limit = { + can_use_viking_invasion_cbs_trigger = yes + } + if = { + limit = { NOT = { culture = scope:defender.culture } } + add = 0.5 + if = { + limit = { + NOT = { culture = { has_same_culture_heritage = scope:defender.culture } } + } + add = 0.5 + } + } + if = { + limit = { NOT = { faith = scope:defender.faith } } + add = 0.5 + if = { + limit = { NOT = { faith.religion = scope:defender.faith.religion } } + add = 0.5 + } + } + if = { + limit = { + scope:defender.faith = { + has_doctrine_parameter = unreformed + } + } + multiply = 0.2 + } + if = { + limit = { + scope:defender.faith = scope:attacker.faith + } + multiply = 0.2 + } + if = { # Russian Vikings stay home + limit = { + scope:attacker = { + capital_province = { + geographical_region = world_europe_east + } + NOT = { + character_is_realm_neighbor = scope:defender + } + } + } + multiply = 0.1 + } + if = { # Norsemen should prefer their historical targets + limit = { + scope:attacker = { + OR = { + capital_province = { + geographical_region = world_europe_north + } + capital_province = { + geographical_region = world_europe_west + } + capital_province = { + geographical_region = world_europe_west_francia + } + capital_province = { + geographical_region = world_europe_west_germania + } + } + } + scope:defender = { + OR = { + capital_province = { + geographical_region = world_europe_west + } + capital_province = { + geographical_region = world_europe_west_francia + } + capital_province = { + geographical_region = world_europe_west_germania + } + } + } + } + multiply = 10 + } + if = { # Norsemen should not rush the Pope... + limit = { + scope:attacker.faith.religion = faith:norse_pagan.religion + scope:defender = { + has_title = title:k_papal_state + } + } + multiply = 0.01 + } + } + # Haesteinn needs to stop merc'ing East Francia when the resulting kingdom simply will not last. + if = { + limit = { this = character:6878 } + # Assuming the player hasn't opted into batshit Vikings. + if = { + limit = { + NOT = { has_game_rule = fp1_scandi_adventurers_apocalyptic } + } + # Tell him to calm it down a bit and pick a damned duchy realm or something. + if = { + limit = { + scope:defender = { + OR = { + realm_size >= massive_realm_size + highest_held_title_tier >= tier_kingdom + } + } + } + multiply = 0 + } + # ... and a bit of bonus score if said-realm is an NPC Mercia to get him to behave a bit more historically. + if = { + limit = { + scope:defender = { + primary_title = title:d_hereford + is_independent_ruler = yes + is_ai = yes + } + } + multiply = 100 + } + } + # ... in which case, go extra wild. + else_if = { + limit = { has_game_rule = fp1_scandi_adventurers_apocalyptic } + # Nothing but a shiny new kingdom will satisfy apocalypse-Haesteinn. + if = { + limit = { + scope:defender = { highest_held_title_tier <= tier_duchy } + } + multiply = 0 + } + } + } + } +} + +struggle_conquest_ai_score_value = { + value = 1 + scope:attacker = { + # Are they a different faith than me? + if = { + limit = { + NOT = { faith = scope:defender.faith } + } + add = 1 + } + # Are they a different culture than me? + if = { + limit = { + NOT = { culture = scope:defender.culture } + } + add = 1 + } + # Do I have a negative relationship with them? + if = { + limit = { has_relation_nemesis = scope:defender } + add = 2 + } + else_if = { + limit = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:defender } + } + add = 1 + } + # Do I have a positive relationship with them? + if = { + limit = { + OR = { + has_relation_soulmate = scope:defender + has_relation_best_friend = scope:defender + } + } + add = -5 + } + else_if = { + limit = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:defender } + } + add = -1 + } + # Multiply this up or down per the phase. + ## Some phases make people hunger for violence... + if = { + limit = { + any_character_struggle = { + is_struggle_type = iberian_struggle + is_struggle_phase = struggle_iberia_phase_hostility + } + # Unless you're just not that sort of person. + NOR = { + has_trait = content + has_trait = compassionate + } + } + multiply = 2 + } + ## ... but in others, it seems abhorrent. + if = { + limit = { + any_character_struggle = { + is_struggle_type = iberian_struggle + OR = { + is_struggle_phase = struggle_iberia_phase_compromise + is_struggle_phase = struggle_iberia_phase_conciliation + } + } + NOR = { + has_trait = ambitious + has_trait = callous + has_trait = sadistic + } + } + multiply = 0.5 + } + } +} + +byzantium_conquests_ai_score_value = { + value = 1 + # Are we part of the Roman empire? + if = { + limit = { + scope:attacker = { + # We only care about governors and above, so don't worry about counts even if they're within the empire. + highest_held_title_tier >= tier_duchy + # Now check title ownership. + OR = { + has_title = title:e_byzantium + has_title = title:e_roman_empire + any_liege_or_above = { + OR = { + has_title = title:e_byzantium + has_title = title:e_roman_empire + } + } + # Account for the 4th crusade. + ## Y'know, roughly. + AND = { + NOT = { + exists = title:e_byzantium + } + primary_title = { + OR = { + empire = title:e_byzantium + empire = title:e_latin_empire + } + } + OR = { + culture = { has_cultural_pillar = heritage_byzantine } + culture = culture:greek + culture = { + any_parent_culture_or_above = { + this = culture:greek + } + } + } + } + } + } + } + # Ok, cool. Now let's set some historical priorities. + every_target_title = { + title_province = { + # Constantinople is king. + if = { + limit = { county = title:c_byzantion } + add = 100 + } + ## We literally do not care about Rome: New York beats OG York, New Rome beats OG Rome. + # Next, we prioritise Anatolia. + else_if = { + limit = { geographical_region = ghw_region_anatolia } + add = 5 + } + # Then Greece and the Balkans. + else_if = { + limit = { + OR = { + geographical_region = ghw_region_greece + geographical_region = ghw_region_thessalonika + geographical_region = custom_eastern_balkans + } + } + add = 4.5 + } + # Then Syria and co. + else_if = { + limit = { geographical_region = custom_roman_syria_palestina } + add = 4 + } + # Egypt. + else_if = { + limit = { geographical_region = custom_roman_aegyptus } + add = 3.5 + } + # Mesopotamia. + else_if = { + limit = { geographical_region = custom_roman_mesopotamia } + add = 3 + } + # Illyria. + else_if = { + limit = { geographical_region = custom_roman_illyricum } + add = 2.5 + } + # North Africa. + else_if = { + limit = { + OR = { + geographical_region = custom_roman_cyrenaica + geographical_region = custom_roman_africa + geographical_region = custom_roman_mauretania + } + } + add = 2 + } + # Italy. + else_if = { + limit = { geographical_region = ghw_region_italy } + add = 1.8 + } + # Iberia. + else_if = { + limit = { geographical_region = custom_roman_hispania } + add = 1.5 + } + # The remainder. + ## Anything we missed in the east. + else_if = { + # You say "why not use Eastern Roman Empire borders?", I say, if the players are gonna obsess over historical borders then so too shall the AI. + limit = { geographical_region = custom_theodosian_ere } + add = 1 + } + ## Then total. + else_if = { + limit = { geographical_region = custom_roman_empire } + add = 0.5 + } + # And _otherwise_, we probably don't want to even look at this thing. + ## May be overridden by weird preferance combination from other values, but generally we'll hopefully get a fairly insular, naval gazing Rome. + } + } + } +} + +muslim_invasions_prefer_nonmuslims_ai_score_value = { + value = 1 + if = { + limit = { + scope:attacker.religion = religion:islam_religion + } + every_in_list = { + list = target_titles + if = { + limit = { + OR = { + AND = { + tier = tier_county + NOT = { holder.top_liege.religion = religion:islam_religion } + any_county_province = { + geographical_region = ghw_region_holy_land + } + } + AND = { + tier > tier_county + any_in_de_jure_hierarchy = { + tier = tier_county + NOT = { holder.top_liege.religion = religion:islam_religion } + any_county_province = { + geographical_region = ghw_region_holy_land + } + } + } + } + } + add = 1000 + } + else_if = { + limit = { + OR = { + AND = { + tier = tier_county + NOT = { holder.top_liege.religion = religion:islam_religion } + any_county_province = { + OR = { + geographical_region = ghw_region_anatolia + geographical_region = world_india + } + } + } + AND = { + tier > tier_county + any_in_de_jure_hierarchy = { + tier = tier_county + NOT = { holder.top_liege.religion = religion:islam_religion } + any_county_province = { + OR = { + geographical_region = ghw_region_anatolia + geographical_region = world_india + } + } + } + } + } + } + add = 200 + } + else_if = { + limit = { + OR = { + AND = { + tier = tier_county + NOT = { holder.top_liege.religion = religion:islam_religion } + } + AND = { + tier > tier_county + any_in_de_jure_hierarchy = { + tier = tier_county + NOT = { holder.top_liege.religion = religion:islam_religion } + } + } + } + } + add = 2 + } + } + } +} + +# Raid for captives +raid_for_captives_ai_score_value = { + value = 10 + scope:attacker = { + if = { + limit = { + piety < 0 + } + add = 15 + } + if = { + limit = { + ai_zeal >= medium_positive_ai_value + piety < 500 + } + add = 5 + } + if = { + limit = { + ai_zeal >= very_high_positive_ai_value + } + add = ai_zeal + } + if = { + limit = { + piety > 500 + } + multiply = 0.5 + } + if = { + limit = { + ai_zeal < 0 + NOT = { + piety < -100 + } + } + multiply = 0 + } + } +} + +# Artifact wars + +relic_artifact_war_ai_score_value = { + value = 10 + scope:attacker = { + if = { + limit = { + ai_greed > 0 + } + add = { + value = ai_greed + divide = 2 + } + } + if = { + limit = { + ai_zeal > 0 + } + add = ai_zeal + } + } +} + +artifact_war_ai_score_value = { + value = 10 + scope:attacker = { + if = { + limit = { + ai_greed > 0 + } + add = { + value = ai_greed + divide = 2 + } + } + if = { + limit = { + ai_vengefulness > 0 + } + add = ai_vengefulness + } + } +} + +############# +# Vassalization CB +############# + +vassalize_default_size = 4 + +vassalize_growth_per_innovation = 3 + +vassalization_size_limit = { + value = vassalize_default_size + scope:attacker = { + if = { + limit = { + culture = { + has_innovation = innovation_casus_belli + } + } + add = vassalize_growth_per_innovation + } + if = { + limit = { + culture = { + has_innovation = innovation_chronicle_writing + } + } + add = vassalize_growth_per_innovation + } + if = { + limit = { + culture = { + has_innovation = innovation_divine_right + } + } + add = vassalize_growth_per_innovation + } + if = { + limit = { + culture = { + has_innovation = innovation_rightful_ownership + } + } + add = vassalize_growth_per_innovation + } + } +} + +############# +# GHWs +############# +third_of_defenders_strength = { + value = ghw_defenders_strength + multiply = 0.33 +} + +############# +# Siege +############# + +siege_base_capture_chance = { + value = 35 + + # Dynasty Perk: Practiced Kidnappers + if = { + limit = { + scope:occupant = { + exists = dynasty + dynasty = { has_dynasty_perk = fp1_pillage_legacy_3 } + } + } + add = 20 + } + # Cultural Parameter: State Ransoms + if = { + limit = { + OR = { + # Either you're involved in large groups of the holding surrendering... + scope:barony.culture = { has_cultural_parameter = knights_die_less_but_are_captured_more } + # ... or you know your liege will pay your ransom. + scope:barony.holder.culture = { has_cultural_parameter = knights_die_less_but_are_captured_more } + } + # Ransoms or no, the primary participants & their heirs know better than to surrender. + character_is_potential_valuable_prisoner = no + # And independent characters likewise have no incentive. + is_independent_ruler = no + } + add = 50 + } +} +raid_base_capture_chance = { + value = 20 + + if = { + limit = { + exists = root.army_commander + } + # Trait: Viking + if = { + limit = { root.army_commander = { has_trait = viking } } + add = 5 + } + # Dynasty Perk: Practiced Kidnappers + if = { + limit = { + exists = root.army_commander.dynasty + root.army_commander.dynasty = { has_dynasty_perk = fp1_pillage_legacy_3 } + } + add = 20 + } + } +} + +county_control_loss_value = { + value = -40 + + # Dynasty Perk: No Quarter + if = { + limit = { + root = { + exists = dynasty + dynasty = { has_dynasty_perk = fp1_pillage_legacy_5 } + } + } + add = -40 + } +} + +raid_county_control_loss_value = { + value = -10 + + # Dynasty Perk: No Quarter + if = { + limit = { + scope:raider ?= { + exists = dynasty + dynasty = { has_dynasty_perk = fp1_pillage_legacy_5 } + } + } + add = -20 + } +} + +############# +# CB Costs +############# + + +scale_10_war_defender_win = { + value = 10 + + if = { + limit= { + scope:defender.culture = { + has_cultural_parameter = more_fame_for_successful_defensive_wars + } + } + multiply = 2 + } +} + +###################### +# AI Decision Making # +###################### +# The two effects below are to be used in combination as "root_military_strength_higher_than_value > target_military_strength_root_value" to check player vs enemy strength +root_military_strength_higher_than_value = { # Once again joe saves the day or erm, script. + value = 0 + add = max_military_strength # Add num of troops + if = { + limit = { + any_ally = { + NOT = { has_truce = scope:target_military } + } + } + every_ally = { + limit = { + NOT = { has_truce = scope:target_military } + } + add = max_military_strength + } + } + if = { + limit = { exists = var:ai_strength_multiplier } + multiply = var:ai_strength_multiplier # 1.25 == 25% stronger than, remember to potty train your script and have it remove the variable after usage!! + } +} + +target_military_strength_root_value = { # One above calcs player strength (plus multiplier), this one is enemy strenth + value = 0 + add = scope:target_military.max_military_strength # this should be a character, probably a top liege + if = { + limit = { + any_ally = { + NOT = { has_truce = root } + } + } + every_ally = { + limit = { + NOT = { has_truce = root } + } + add = max_military_strength + } + } +} + +war_attacker_total_strength_value = { + value = 0 + every_war_attacker = { add = max_military_strength } +} + +war_defender_total_strength_value = { + value = 0 + every_war_defender = { add = max_military_strength } +} + +war_attacker_total_strength_halved_value = { + value = war_attacker_total_strength_value + divide = 2 +} + +war_defender_total_strength_halved_value = { + value = war_defender_total_strength_value + divide = 2 +} + +war_attacker_total_strength_tenth_value = { + value = war_attacker_total_strength_value + divide = 10 +} + +war_defender_total_strength_tenth_value = { + value = war_defender_total_strength_value + divide = 10 +} + +war_attacker_total_current_strength_value = { + value = 0 + every_war_attacker = { add = current_military_strength } +} + +war_defender_total_current_strength_value = { + value = 0 + every_war_defender = { add = current_military_strength } +} + +war_attacker_total_current_strength_halved_value = { + value = war_attacker_total_current_strength_value + divide = 2 +} + +war_defender_total_current_strength_halved_value = { + value = war_defender_total_current_strength_value + divide = 2 +} + +war_attacker_total_current_strength_tenth_value = { + value = war_attacker_total_current_strength_value + divide = 10 +} + +war_defender_total_current_strength_tenth_value = { + value = war_defender_total_current_strength_value + divide = 10 +} + +war_attacker_total_current_strength_divided_by_defender_value = { + value = war_attacker_total_current_strength_value + divide = war_defender_total_current_strength_value + round = yes +} + +war_defender_total_current_strength_divided_by_attacker_value = { + value = war_defender_total_current_strength_value + divide = war_attacker_total_current_strength_value + round = yes +} + +war_total_participants_current_strength_value = { + value = 0 + every_war_participant = { add = current_military_strength } +} + +total_war_attacker_strength_value = { + value = 0 + every_character_war = { + limit = { prev = primary_defender } + every_war_attacker = { add = current_military_strength } + } +} + +total_war_enemy_strength_value = { + value = 0 + every_war_enemy = { add = current_military_strength } +} diff --git a/common/script_values/01_dynamic_values.txt b/common/script_values/01_dynamic_values.txt new file mode 100644 index 00000000..3671f21d --- /dev/null +++ b/common/script_values/01_dynamic_values.txt @@ -0,0 +1,1831 @@ + +# Can't reference a named value that hasn't been defined yet, so this file is late in the load order +# Feel free to use other files as well, but be careful about load order +# Please remove the example formulas once there's a few real formulas + + + + +#GOLD + +#Based on income + limits + +tiny_gold_value = { #To be used as flavor (paying a stablehand, throwing coins in a wishing well) + value = monthly_character_income + multiply = tiny_income_multiplier_value # 1.2 months + min = tiny_gold_min_value + max = tiny_gold_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +tiny_gold_value_static_max = { #To be used as flavor (paying a stablehand, throwing coins in a wishing well) + value = monthly_character_income + multiply = tiny_income_multiplier_value # 1.2 months + min = tiny_gold_min_value + max = tiny_gold_max_value_static + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +minor_gold_value = { #To be used as a run-of-the-mill amount + value = monthly_character_income + multiply = minor_income_multiplier_value # 3 months + min = minor_gold_min_value + max = minor_gold_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +minor_gold_value_static_max = { #To be used as a run-of-the-mill amount + value = monthly_character_income + multiply = minor_income_multiplier_value # 3 months + min = minor_gold_min_value + max = minor_gold_max_value_static + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +medium_gold_value = { + value = monthly_character_income + multiply = medium_income_multiplier_value # 6 months + min = medium_gold_min_value + max = medium_gold_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +medium_gold_value_static_max = { + value = monthly_character_income + multiply = medium_income_multiplier_value # 6 months + min = medium_gold_min_value + max = medium_gold_max_value_static + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +major_gold_value = { + value = monthly_character_income + multiply = major_income_multiplier_value # 12 months, a year + min = major_gold_min_value + max = major_gold_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +major_gold_value_static_max = { + value = monthly_character_income + multiply = major_income_multiplier_value # 12 months, a year + min = major_gold_min_value + max = major_gold_max_value_static + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +massive_gold_value = { #Highest gold to be used in events, very rare + value = monthly_character_income + multiply = massive_income_multiplier_value # 18 months, one and a half years + min = massive_gold_min_value + max = massive_gold_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +massive_gold_value_static_max = { #Highest gold to be used in events, very rare + value = monthly_character_income + multiply = massive_income_multiplier_value # 18 months, one and a half years + min = massive_gold_min_value + max = massive_gold_max_value_static + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +monumental_gold_value = { # Only to be used in extreme cases, primarily for player-initiated actions. + value = monthly_character_income + multiply = monumental_income_multiplier_value # 36 months, three years + min = monumental_gold_min_value + max = monumental_gold_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +monumental_gold_value_static_max = { # Only to be used in extreme cases, primarily for player-initiated actions. + value = monthly_character_income + multiply = monumental_income_multiplier_value # 36 months, three years + min = monumental_gold_min_value + max = monumental_gold_max_value_static + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +## Negative Gold Values +tiny_gold_value_negative = { + value = tiny_gold_value + multiply = -1 +} + +minor_gold_value_negative = { + value = minor_gold_value + multiply = -1 +} + +medium_gold_value_negative = { + value = medium_gold_value + multiply = -1 +} + +major_gold_value_negative = { + value = major_gold_value + multiply = -1 +} + +massive_gold_value_negative = { + value = massive_gold_value + multiply = -1 +} + +monumental_gold_value_negative = { + value = monumental_gold_value + multiply = -1 +} +## End negative gold values + +tiny_gold_loss = { + add = tiny_gold_value + multiply = -1 +} + +minor_gold_loss = { + add = minor_gold_value + multiply = -1 +} + +medium_gold_loss = { + add = medium_gold_value + multiply = -1 +} + +major_gold_loss = { + add = major_gold_value + multiply = -1 +} + +massive_gold_loss = { + add = massive_gold_value + multiply = -1 +} + +monumental_gold_loss = { + add = monumental_gold_value + multiply = -1 +} + +gift_interaction_cutoff = { + value = yearly_character_income + multiply = 3 + min = 10 + max = 300 +} + +head_of_faith_gold_value = { + value = monthly_character_income + multiply = massive_income_multiplier_value + min = massive_gold_min_value + max = monumental_gold_max_value +} + +minor_treasury_value = { + value = yearly_character_income + multiply = 1 +} + +medium_treasury_value = { + value = yearly_character_income + multiply = 3 +} + +major_treasury_value = { + value = yearly_character_income + multiply = 5 +} + +massive_treasury_value = { + value = yearly_character_income + multiply = 7 +} + +monumental_treasury_value = { + value = yearly_character_income + multiply = 10 +} + +seek_indulgences_major_criminal_trait_value = { + value = head_of_faith_gold_value + multiply = 2.5 +} +seek_indulgences_medium_criminal_trait_value = { + value = head_of_faith_gold_value + multiply = 2.0 +} +seek_indulgences_minor_criminal_trait_value = { + value = head_of_faith_gold_value + multiply = 1.5 +} +seek_indulgences_buy_piety_value = { + value = head_of_faith_gold_value + multiply = 1.0 +} + +holy_order_gold_value = { + value = monthly_character_income + multiply = major_income_multiplier_value + min = medium_gold_max_value + max = massive_gold_max_value +} + +create_duchy_title_value = { + add = 300 + multiply = { + value = 1 + #Legitimacy discounts + if = { + limit = { legitimacy_level = 5 } + subtract = 0.35 + } + if = { + limit = { legitimacy_level = 4 } + subtract = 0.25 + } + if = { + limit = { legitimacy_level = 3 } + subtract = 0.2 + } + if = { + limit = { legitimacy_level = 2 } + subtract = 0.15 + } + if = { + limit = { has_perk = ducal_conquest_perk } # Ducal Conquest + subtract = 0.2 + } + if = { + limit = { + culture = { has_innovation = innovation_divine_right } # Divine Right + } + subtract = 0.2 + } + if = { + limit = { government_has_flag = government_is_tribal } # Tribal + subtract = 0.5 + } + if = { + limit = { + faith = { has_doctrine = tenet_pursuit_of_power } # Pursuit of Power + } + subtract = 0.5 + } + if = { + limit = { + culture = { has_cultural_pillar = ethos_courtly } # Courtly + } + subtract = 0.15 + } + if = { + limit = { + culture = { has_cultural_tradition = tradition_legalistic } # Legalistic + } + subtract = 0.3 + } + if = { + limit = { + dynasty = { has_dynasty_perk = law_legacy_2 } # Faithful Magistrates + } + subtract = 0.2 + } + min = 0.2 # 80% max discount from defines + } +} + +create_kingdom_title_value = { + add = 600 + multiply = { + value = 1 + #Legitimacy discounts + if = { + limit = { legitimacy_level = 5 } + subtract = 0.35 + } + if = { + limit = { legitimacy_level = 4 } + subtract = 0.25 + } + if = { + limit = { legitimacy_level = 3 } + subtract = 0.2 + } + if = { + limit = { legitimacy_level = 2 } + subtract = 0.15 + } + if = { + limit = { has_perk = ducal_conquest_perk } # Ducal Conquest + subtract = 0.2 + } + if = { + limit = { + culture = { has_innovation = innovation_divine_right } # Divine Right + } + subtract = 0.2 + } + if = { + limit = { government_has_flag = government_is_tribal } # Tribal + subtract = 0.5 + } + if = { + limit = { + faith = { has_doctrine = tenet_pursuit_of_power } # Pursuit of Power + } + subtract = 0.5 + } + if = { + limit = { + culture = { has_cultural_pillar = ethos_courtly } # Courtly + } + subtract = 0.15 + } + if = { + limit = { + culture = { has_cultural_tradition = tradition_legalistic } # Legalistic + } + subtract = 0.3 + } + if = { + limit = { + dynasty = { has_dynasty_perk = law_legacy_2 } # Faithful Magistrates + } + subtract = 0.2 + } + min = 0.2 # 80% max discount from defines + } +} + +create_empire_title_value = { + add = 1200 + multiply = { + value = 1 + #Legitimacy discounts + if = { + limit = { legitimacy_level = 5 } + subtract = 0.35 + } + if = { + limit = { legitimacy_level = 4 } + subtract = 0.25 + } + if = { + limit = { legitimacy_level = 3 } + subtract = 0.2 + } + if = { + limit = { legitimacy_level = 2 } + subtract = 0.15 + } + if = { + limit = { has_perk = ducal_conquest_perk } # Ducal Conquest + subtract = 0.2 + } + if = { + limit = { + culture = { has_innovation = innovation_divine_right } # Divine Right + } + subtract = 0.2 + } + if = { + limit = { government_has_flag = government_is_tribal } # Tribal + subtract = 0.5 + } + if = { + limit = { + faith = { has_doctrine = tenet_pursuit_of_power } # Pursuit of Power + } + subtract = 0.5 + } + if = { + limit = { + culture = { has_cultural_pillar = ethos_courtly } # Courtly + } + subtract = 0.15 + } + if = { + limit = { + culture = { has_cultural_tradition = tradition_legalistic } # Legalistic + } + subtract = 0.3 + } + if = { + limit = { + dynasty = { has_dynasty_perk = law_legacy_2 } # Faithful Magistrates + } + subtract = 0.2 + } + min = 0.2 # 80% max discount from defines + } +} + + +#DUEL +duel_skill_multiplier_base = { #How many more skill points an extremely skilled character has than the averagely skilled character + add = extremely_high_skill_rating + subtract = medium_skill_rating +} + +#When used in a duel_value compare modifier, where the duel character has extremely good skill and the target has avarage skill, these modifiers will add... + +#10 +tiny_positive_duel_skill_multiplier = { + add = 10 + divide = duel_skill_multiplier_base +} + +#25 +low_positive_duel_skill_multiplier = { + add = 25 + divide = duel_skill_multiplier_base +} + +#50 +medium_positive_duel_skill_multiplier = { + add = 50 + divide = duel_skill_multiplier_base +} + +#75 +high_positive_duel_skill_multiplier = { + add = 75 + divide = duel_skill_multiplier_base +} + +#10 +tiny_negative_duel_skill_multiplier = { + add = -10 + divide = duel_skill_multiplier_base +} + +#-25 +low_negative_duel_skill_multiplier = { + add = -25 + divide = duel_skill_multiplier_base +} + +#-50 +medium_negative_duel_skill_multiplier = { + add = -50 + divide = duel_skill_multiplier_base +} + +#-75 +high_negative_duel_skill_multiplier = { + add = -75 + divide = duel_skill_multiplier_base +} + + +# Referenced by code. Amount of gold gained by the winning side per 1000 men who died in battle (hard casualties) +# Root is the winner main participant +# scope:enemy_battle_owner is the main enemy participant +# scope:combat is the combat itself +battle_winner_gold_gain = { + value = 0 + + if = { # Cultural tradition + limit = { + culture = { + has_cultural_parameter = gain_gold_from_battles + } + } + add = 10 + } + + if = { # Bonus for legacy + limit = { + exists = dynasty + dynasty = { + has_dynasty_perk = fp1_pillage_legacy_4 + } + } + add = 50 + } + + if = { # Master of Spoils Camp Officer + limit = { + employs_court_position = master_of_spoils_camp_officer + } + add = { + value = court_position:master_of_spoils_camp_officer.aptitude:master_of_spoils_camp_officer + add = 1 + multiply = 10 + } + } +} + +# Referenced by code. Amount of prestige gained by the winning side per 1000 men who died in battle (hard casualties) +# Root is the winner main participant +# scope:enemy_battle_owner is the main enemy participant +# scope:combat is the combat itself +battle_winner_prestige_gain = { + value = 75 + + if = { # Bonus for tribals + limit = { + government_has_flag = government_is_tribal + } + add = 75 + } + + if = { # Leading the troops yourself adds a bit + limit = { + OR = { + scope:combat = { + combat_attacker = { + exists = side_commander + side_commander = { + this = root + } + } + } + scope:combat = { + combat_defender = { + exists = side_commander + side_commander = { + this = root + } + } + } + } + } + add = 40 + } + + if = { # Bonus for legacy + limit = { + exists = dynasty + dynasty = { + has_dynasty_perk = fp1_pillage_legacy_1 + } + } + multiply = 2 + } + + if = { # Cultural tradition + limit = { + culture = { + has_cultural_parameter = less_prestige_from_battles + } + } + multiply = 0.1 + } + + # Fighting Peasants Rebellion + if = { + limit = { + scope:enemy_battle_owner = { has_variable = rebel_leader_peasants } + } + multiply = 0.25 # to test + } + + if = { # Reduced for LAAMPs + limit = { + is_landless_adventurer = yes + } + multiply = 0.75 + } + + if = { # Master of Spoils Camp Officer + limit = { + employs_court_position = master_of_spoils_camp_officer + } + add = { + value = court_position:master_of_spoils_camp_officer.aptitude:master_of_spoils_camp_officer + add = 1 + multiply = 10 + } + } + + if = { # BP3 - Kings of the Wilds Perk + limit = { + has_perk = personal_touch_perk + landless_inspector_king_of_the_wilds = yes + } + multiply = 1.5 + } +} + +# Referenced by code. Amount of piety gained by the winning side per 1000 men who died in battle (hard casualties) +# Root is the winner main participant +# scope:enemy_battle_owner is the main enemy participant +# scope:combat is the combat itself +battle_winner_piety_gain = { + value = 0 + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:enemy_battle_owner.faith + value >= religious_cb_enabled_hostility_level + } + } + } + value = 35 + + if = { # Bonus for tribals + limit = { + government_has_flag = government_is_tribal + } + add = 50 + } + + if = { # Leading the troops yourself adds a bit + limit = { + OR = { + scope:combat = { + combat_attacker = { + exists = side_commander + side_commander = { + this = root + } + } + } + scope:combat = { + combat_defender = { + exists = side_commander + side_commander = { + this = root + } + } + } + } + } + add = 20 + } + + if = { # Master of Spoils Camp Officer + limit = { + employs_court_position = master_of_spoils_camp_officer + } + add = { + value = court_position:master_of_spoils_camp_officer.aptitude:master_of_spoils_camp_officer + add = 1 + multiply = 10 + } + } + } + + # Fighting Peasants Rebellion + if = { + limit = { + scope:enemy_battle_owner = { has_variable = rebel_leader_peasants } + } + multiply = 0.25 # to test + } + + if = { # Reduced for LAAMPs + limit = { + is_landless_adventurer = yes + } + multiply = 0.75 + } +} + +# Referenced by code. Chance 0-100 that a randomly created ruler will be female +# Root is the new liege or previous holder of the title +random_ruler_chance_for_female = { + value = 0 + faith = { + if = { + limit = { has_dominant_ruling_gender = dummy_female } # if faith allows females to rule, then add 50% chance + add = 50 + } + if = { + limit = { NOT = { has_dominant_ruling_gender = dummy_male } } # if faith forbids males to rule, then add 50% chance + add = 50 + } + } +} + +# Referenced by code. Chance 0-100 that a randomly created ruler for a temple will be female +# Root is the new liege or previous holder of the title +random_theocratic_ruler_chance_for_female = { + value = 0 + faith = { + if = { + limit = { has_doctrine = doctrine_clerical_gender_female_only } + add = 100 + } + if = { + limit = { has_doctrine = doctrine_clerical_gender_male_only } + add = 0 + } + if = { + limit = { has_doctrine = doctrine_clerical_gender_either } + add = 50 + } + } +} + +age_compared_to_root_plus_ten = { + add = age + subtract = root.age + add = 10 +} + +age_compared_to_root_minus_ten = { + add = age + subtract = root.age + subtract = 10 +} + +age_compared_to_root_plus_ten_always_adult = { + add = age + subtract = root.age + add = 10 + if = { + limit = { + is_male = yes + } + min = define:NCharacter|MALE_ADULT_AGE + } + if = { + limit = { + is_female = yes + } + min = define:NCharacter|FEMALE_ADULT_AGE + } +} + +age_compared_to_root_minus_ten_always_adult = { + add = age + subtract = root.age + subtract = 10 + if = { + limit = { + is_male = yes + } + min = define:NCharacter|MALE_ADULT_AGE + } + if = { + limit = { + is_female = yes + } + min = define:NCharacter|FEMALE_ADULT_AGE + } +} + + +#EXAMPLES +example_total_family_age = { + add = age + add = father.age + add = mother.age + modulo = 10 +} + +example_fancy_gold = { + add = gold + multiply = 3 + divide = 2 + subtract = 500 + max = 2500 + min = 1000 +} + +example_age_based_gold = { + add = 1000 + if = { + limit = { age > 30 } + divide = 2 + } + else_if = { + limit = { age < 20 } + divide = 4 + } + else = { + divide = 8 + } +} + +genetic_character_value = { + value = 0 + #BEAUTY + if = { + limit = { has_trait = beauty_bad_1 } + add = -1 + } + if = { + limit = { has_trait = beauty_bad_2 } + add = -2 + } + if = { + limit = { has_trait = beauty_bad_3 } + add = -3 + } + if = { + limit = { has_trait = beauty_good_1 } + add = 1 + } + if = { + limit = { has_trait = beauty_good_2 } + add = 2 + } + if = { + limit = { has_trait = beauty_good_3 } + add = 3 + } + #INTELLECT + if = { + limit = { has_trait = intellect_bad_1 } + add = -1 + } + if = { + limit = { has_trait = intellect_bad_2 } + add = -2 + } + if = { + limit = { has_trait = intellect_bad_3 } + add = -3 + } + if = { + limit = { has_trait = intellect_good_1 } + add = 1 + } + if = { + limit = { has_trait = intellect_good_2 } + add = 2 + } + if = { + limit = { has_trait = intellect_good_3 } + add = 3 + } + #PHYSIQUE + if = { + limit = { has_trait = physique_bad_1 } + add = -1 + } + if = { + limit = { has_trait = physique_bad_2 } + add = -2 + } + if = { + limit = { has_trait = physique_bad_3 } + add = -3 + } + if = { + limit = { has_trait = physique_good_1 } + add = 1 + } + if = { + limit = { has_trait = physique_good_2 } + add = 2 + } + if = { + limit = { has_trait = physique_good_3 } + add = 3 + } + #MISC GOOD GENETIC + if = { + limit = { has_trait = fecund } + add = 1 + } + #MISC BAD GENETIC + if = { + limit = { has_trait = clubfooted } + add = -1 + } + if = { + limit = { has_trait = hunchbacked } + add = -1 + } + if = { + limit = { has_trait = lisping } + add = -1 + } + if = { + limit = { has_trait = stuttering } + add = -1 + } + if = { + limit = { has_trait = giant } + add = -1 + } + if = { + limit = { has_trait = inbred } + add = -3 + } + if = { + limit = { has_trait = spindly } + add = -1 + } + if = { + limit = { has_trait = scaly } + add = -1 + } + if = { + limit = { has_trait = albino } + add = -1 + } + if = { + limit = { has_trait = wheezing } + add = -1 + } + if = { + limit = { has_trait = bleeder } + add = -1 + } + if = { + limit = { has_trait = infertile } + add = -1 + } + if = { + limit = { has_trait = depressed_genetic } + add = -1 + } + if = { + limit = { has_trait = lunatic_genetic } + add = -1 + } + if = { + limit = { has_trait = possessed_genetic } + add = -1 + } +} + +individual_recruit_guest_interaction_cost = { + add = 15 + + ###CLAIMS### + if = { + limit = { + save_temporary_scope_as = claim_holder + any_claim = { + courtier_or_guest_claim_trigger = { RULER = scope:claim_holder.host } + } + } + if = { + limit = { + save_temporary_scope_as = claim_holder + any_claim = { + courtier_or_guest_claim_trigger = { RULER = scope:claim_holder.host } + tier >= tier_duchy + } + } + add = 50 + } + else_if = { + limit = { + save_temporary_scope_as = claim_holder + any_claim = { + courtier_or_guest_claim_trigger = { RULER = scope:claim_holder.host } + tier = tier_county + } + } + add = 25 + } + } + + ###DYNASTY### + if = { + limit = { exists = dynasty } + add = { + value = dynasty.dynasty_prestige_level #0-10 + multiply = 5 #Max 50 + } + } + + ###GENETIC TRAITS### + add = { + value = genetic_character_value + multiply = 3 + min = -15 + max = 15 + } + + ###COMMANDER TRAITS### + if = { + limit = { number_of_commander_traits >= 1 } + add = { + value = number_of_commander_traits + multiply = 5 + min = 0 + } + + } + + ###COURT PHYSICIAN TRAITS### + if = { + limit = { + OR = { + AND = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + AND = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 100 + } + } + } + } + add = 20 + } + else_if = { + limit = { + OR = { + has_trait = lifestyle_herbalist + AND = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 50 + } + } + AND = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 50 + } + } + } + } + add = 15 + } + else_if = { + limit = { + OR = { + has_trait = lifestyle_physician + has_trait = lifestyle_mystic + } + } + add = 10 + } + + ###SKILLS### + if = { + limit = { diplomacy >= good_skill_level } + add = 5 + } + if = { + limit = { martial >= good_skill_level } + add = 5 + } + if = { + limit = { stewardship >= good_skill_level } + add = 5 + } + if = { + limit = { intrigue >= good_skill_level } + add = 5 + } + if = { + limit = { learning >= good_skill_level } + add = 5 + } + if = { + limit = { prowess >= good_skill_level } + add = 5 + } + + ###PERSONALITY MULTIPLIER### + if = { + limit = { + OR = { + ai_greed >= high_positive_ai_value + has_trait = arrogant + } + } + multiply = 1.2 + } + else_if = { + limit = { + OR = { + ai_greed <= high_negative_ai_value + has_trait = humble + } + } + multiply = 0.8 + } + + ###AMENITIES MULTIPLIER### + if = { + limit = { + host = { + has_royal_court = yes + has_dlc_feature = royal_court + court_owner = { + amenity_level = { type = court_servants value = medium_amenity_level } + } + } + } + multiply = 0.8 + } + else_if = { + limit = { + host = { + has_royal_court = yes + has_dlc_feature = royal_court + court_owner = { + amenity_level = { type = court_servants value = high_amenity_level } + } + } + } + multiply = 0.7 + } + else_if = { + limit = { + host = { + has_royal_court = yes + has_dlc_feature = royal_court + court_owner = { + amenity_level = { type = court_servants value = very_high_amenity_level } + } + } + } + multiply = 0.6 + } + else_if = { + limit = { + host = { + has_royal_court = yes + has_dlc_feature = royal_court + court_owner = { + amenity_level = { type = court_servants value = max_amenity_level } + } + } + } + multiply = 0.5 + } + + min = 10 + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 + + if = { # Cultural Traditions + limit = { + host = { + culture = { + has_cultural_parameter = cheaper_guest_recruitment + } + } + } + multiply = 0.8 + min = 8 + } + + if = { # Dynasty legacy + limit = { + host = { + exists = dynasty + dynasty = { + has_dynasty_perk = erudition_legacy_1 + } + } + } + multiply = 0.7 + min = 7 + } + + + if = { # Tribal rulers pay less + limit = { + host = { + government_has_flag = government_is_tribal + } + } + multiply = 0.5 + min = 10 + } + +} + +recruit_guest_interaction_cost = { + value = 0 + every_traveling_family_member = { + add = individual_recruit_guest_interaction_cost + } +} +recruit_guest_interaction_cost_with_list = { + value = 0 + every_in_list = { + list = recruiting_family + add = individual_recruit_guest_interaction_cost + } +} + +root_attraction_based_female_chance = { + if = { + limit = { + root = { + is_attracted_to_women = yes + is_attracted_to_men = no + } + } + add = 100 + } + else_if = { + limit = { + root = { + is_attracted_to_women = yes + is_attracted_to_men = yes + } + } + add = 50 + } + else = { + add = 0 + } +} + +scope_attraction_based_female_chance = { + if = { + limit = { + scope:attraction_check = { + is_attracted_to_women = yes + is_attracted_to_men = no + } + } + add = 100 + } + else_if = { + limit = { + scope:attraction_check = { + is_attracted_to_women = yes + is_attracted_to_men = yes + } + } + add = 50 + } + else = { + add = 0 + } +} + +root_faith_clergy_gender_female_chance = { + if = { + limit = { + root.faith = { has_doctrine_parameter = clergy_must_be_male } + } + add = 0 + } + else_if = { + limit = { + root.faith = { has_doctrine_parameter = clergy_must_be_female } + } + add = 100 + } + else = { + add = 50 + } +} + +scope_value_target_soldier_female_chance = { + if = { + limit = { + NOT = { + dummy_female = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:value_target } + } + } + dummy_male = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:value_target } + } + } + add = 0 + } + else_if = { + limit = { + dummy_female = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:value_target } + } + NOT = { + dummy_male = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:value_target } + } + } + } + add = 100 + } + else = { + add = 50 + } +} + +root_soldier_female_chance = { + if = { + limit = { + NOT = { dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } } + dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + } + add = 0 + } + else_if = { + limit = { + dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + NOT = { dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } } + } + add = 100 + } + else = { + add = 50 + } +} + +root_non_combatant_female_chance = { + if = { + limit = { + NOT = { dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } } + dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + } + add = 100 + } + else_if = { + limit = { + dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + NOT = { dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } } + } + add = 0 + } + else = { + add = 50 + } +} + +actor_soldier_female_chance = { + if = { + limit = { + NOT = { dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:actor } } } + dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:actor } } + } + add = 0 + } + else_if = { + limit = { + dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:actor } } + NOT = { dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:actor } } } + } + add = 100 + } + else = { + add = 50 + } +} + +recipient_soldier_female_chance = { + if = { + limit = { + NOT = { dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:recipient } } } + dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:recipient } } + } + add = 0 + } + else_if = { + limit = { + dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:recipient } } + NOT = { dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:recipient } } } + } + add = 100 + } + else = { + add = 50 + } +} + +root_faith_dominant_gender_female_chance = { + if = { + limit = { root.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { root.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } +} + +activity_location_faith_dominant_gender_female_chance = { + if = { + limit = { scope:activity.activity_location.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:activity.activity_location.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } +} + +location_faith_dominant_gender_female_chance = { + if = { + limit = { location.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { location.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } +} + +root_faith_dominant_gender_female_reversed_chance = { + if = { + limit = { root.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 100 + } + else_if = { + limit = { root.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 0 + } + else = { + add = 50 + } +} + +root_faith_dominant_gender_adjusted_female_chance = { + if = { + limit = { root.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 20 + } + else_if = { + limit = { root.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 80 + } + else = { + add = 50 + } +} + +root_self_based_female_chance = { + if = { + limit = { + root = { + is_female = yes + } + } + add = 100 + } + else = { + add = 0 + } +} + +marriage_gender_adjusted_female_chance = { + if = { + limit = { + allowed_to_marry_same_sex_trigger = yes + is_female = yes + is_attracted_to_women = yes + is_attracted_to_men = no + OR = { #Already have an heir of their dynasty or don't care + AND = { + exists = primary_heir + exists = dynasty + dynasty = primary_heir.dynasty + } + is_lowborn = yes + } + } + add = 100 + } + else_if = { + limit = { + allowed_to_marry_same_sex_trigger = yes + is_female = yes + is_attracted_to_women = yes + is_attracted_to_men = yes + OR = { #Already have an heir of their dynasty or don't care + AND = { + exists = primary_heir + exists = dynasty + dynasty = primary_heir.dynasty + } + is_lowborn = yes + } + } + add = 50 + } + else_if = { + limit = { + is_female = yes + } + add = 0 + } + else_if = { + limit = { + allowed_to_marry_same_sex_trigger = yes + is_male = yes + is_attracted_to_men = yes + is_attracted_to_women = no + OR = { #Already have an heir of their dynasty or don't care + AND = { + exists = primary_heir + exists = dynasty + dynasty = primary_heir.dynasty + } + is_lowborn = yes + } + } + add = 0 + } + else_if = { + limit = { + allowed_to_marry_same_sex_trigger = yes + is_male = yes + is_attracted_to_men = yes + is_attracted_to_women = yes + OR = { #Already have an heir of their dynasty or don't care + AND = { + exists = primary_heir + exists = dynasty + dynasty = primary_heir.dynasty + } + is_lowborn = yes + } + } + add = 50 + } + else = { + add = 100 + } +} + +root_sexuality_female_chance = { + if = { + limit = { + root = { + is_attracted_to_women = yes + is_attracted_to_men = no + } + } + add = 100 + } + else_if = { + limit = { + root = { + is_attracted_to_women = no + is_attracted_to_men = yes + } + } + add = 0 + } + else = { # Asexual/bi + add = 50 + } +} + +# Referenced by code when auto-assigning perks. Root is a character. Supports the use of randomization +num_perk_points = { + add = age + subtract = 16 + + divide = 3 + min = 0 + max = 20 +} + +stewardship_wealth_5002_investment_duration = 30 +stewardship_wealth_5002_good_tax_increase = 0.1 +stewardship_wealth_5002_great_tax_increase = 0.2 + +stewardship_wealth_5002_payment = { + value = capital_province.monthly_income + multiply = 12 + multiply = stewardship_wealth_5002_investment_duration + multiply = stewardship_wealth_5002_good_tax_increase #Now we're at the amount of extra tax you'd make + divide = 3 + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +stewardship_wealth_5002_one_time_gain = { + value = stewardship_wealth_5002_payment + divide = 2 + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +infidelity_event_delay = 3 + +half_monthly_character_income = { + value = monthly_character_income + multiply = 0.5 +} + +monthly_character_income_minus_expenses = { + value = monthly_character_income + subtract = monthly_character_expenses +} + +monthly_character_expenses_plus_fourty_percent = { + value = monthly_character_expenses + multiply = 1.4 +} + +monthly_character_expenses_times_three = { + value = monthly_character_expenses + multiply = 3 +} + +ai_war_chest_desired_gold_value = { + value = yearly_character_income + multiply = 3 + min = 100 + max = 2000 +} + +ai_inspiration_desired_gold_value = { + value = yearly_character_income + min = basic_fund_inspiration_cost + max = 2000 +} + +ai_war_chest_defender_holy_war_gold_value = { + value = yearly_character_income + multiply = 2 + min = 50 + max = 2000 +} + +steward_convert_culture_value = { + value = yearly_character_income + multiply = 5 + min = 150 +} + +steward_increase_development_value = { + value = yearly_character_income + multiply = 3 + min = 100 +} + +minimum_ai_gold_value_for_tyranny_wars = { + value = yearly_character_income + min = 10 +} + +comfortable_ai_gold_value_for_tyranny_wars = { + value = yearly_character_income + multiply = 3 + min = 25 +} + +uncomfortable_ai_bancruptcy_for_wars = { + value = yearly_character_income + multiply = -2 +} + +very_uncomfortable_ai_bancruptcy_for_wars = { + value = yearly_character_income + multiply = -4 +} + +ai_economic_preference_value = { + value = 1 + if = { + limit = { + scope:holder.capital_province = this + free_building_slots <= 0 + } + add = 1 + } + if = { + limit = { + has_building_or_higher = tax_assessor_01 + free_building_slots <= 0 + } + add = 1 + } +} + +dislikes_maa_value = -9 +compensate_conflict_maa_bonus = 9 +likes_maa_value = 1 +stationed_maa_bonus = 3 +non_stationed_maa_bonus = -3 +really_likes_maa_value = 2 +stacking_bonus_value = 4 +anti_synergy_penalty_value = -9 + +fp2_2007_calculate_architect_competence = { # Intended for use with fp2_2007 in specific, not for general architects. + value = 0 + if = { limit = { culture = { has_cultural_parameter = architect_trait_prestige } } add = 15 } # Collapsed into one line for compactness + if = { limit = { has_trait = organizer } add = 2 } + if = { limit = { has_trait = logistician } add = 5 } + if = { limit = { has_trait = military_engineer } add = 15 } + if = { limit = { has_trait = strategist } add = 4 } + if = { limit = { has_trait = shrewd } add = 5 } + if = { limit = { has_trait = diligent } add = 5 } + if = { limit = { has_trait = temperate } add = 3 } + if = { limit = { has_trait = patient } add = 2 } + if = { limit = { has_trait = paranoid } add = 2 } + if = { limit = { has_trait = scholar } add = 1 } + if = { limit = { has_trait = architect } add = 12 } + if = { limit = { has_trait = content } subtract = 1 } + if = { limit = { has_trait = fickle } subtract = 5 } + if = { limit = { has_trait = arrogant } subtract = 10 } + if = { limit = { has_trait = lazy } subtract = 4 } + if = { limit = { has_trait = impatient } subtract = 5 } + if = { limit = { has_trait = greedy } subtract = 2 } + if = { limit = { has_trait = avaricious } subtract = 1 } + if = { limit = { has_trait = dull } subtract = 10 } +} + +activity_host_faith_dominant_gender_adjusted_female_chance = { + if = { + limit = { + scope:activity.activity_host.faith = { has_doctrine = doctrine_gender_male_dominated } + } + add = 20 + } + else_if = { + limit = { + scope:activity.activity_host.faith = { has_doctrine = doctrine_gender_female_dominated } + } + add = 80 + } + else = { add = 50 } +} + +activity_host_clergy_gender_female_chance = { + if = { + limit = { + scope:activity.activity_host.faith = { has_doctrine_parameter = clergy_must_be_male } + } + add = 0 + } + else_if = { + limit = { + scope:activity.activity_host.faith = { has_doctrine_parameter = clergy_must_be_female } + } + add = 100 + } + else = { add = 50 } +} + +five_times_monumental_value = { + add = monumental_gold_value + multiply = 5 +} diff --git a/common/script_values/02_religion_values.txt b/common/script_values/02_religion_values.txt new file mode 100644 index 00000000..b4a8d344 --- /dev/null +++ b/common/script_values/02_religion_values.txt @@ -0,0 +1,4535 @@ +#Needs to be loaded after +# * medium_gold_value (01_dynamic_values) + +#Religious war CB levels +faith_fully_accepted_level = 0 +faith_astray_level = 1 +faith_hostile_level = 2 +faith_evil_level = 3 + +faith_hostility_prevents_marriage_level = faith_evil_level + +religious_cb_enabled_hostility_level = faith_hostile_level +religious_cb_evil_hostility_level = faith_evil_level + +religious_cb_ally_prestige_kingdom = 500 +religious_cb_ally_prestige_duchy = 200 +religious_cb_ally_prestige_county = 100 + +religious_cb_piety_gain_evil_foe = 200 +religious_cb_piety_gain_empire = 200 +religious_cb_piety_loss_empire = -200 +religious_cb_piety_gain_kingdom = 150 +religious_cb_piety_loss_kingdom = -150 +religious_cb_piety_gain_duchy = 100 +religious_cb_piety_loss_duchy = -100 +religious_cb_piety_gain_county = 50 +religious_cb_piety_loss_county = -50 +religious_cb_piety_white_peace = -50 + +excommunication_cb_piety_change_multiplier = 4 +excommunication_cb_piety_white_peace = -50 + +religious_cb_piety_discount_against_hof_humsac = 0.5 +hof_humsacd_fervour_gain = major_fervor_value + +faith_doctrine_cost_low = 200 +faith_doctrine_cost_mid = 400 +faith_doctrine_cost_high = 600 +faith_doctrine_cost_massive = 1000 + +faith_tenet_cost_low = 500 +faith_tenet_cost_mid = 1000 +faith_tenet_cost_high = 1500 +faith_tenet_cost_massive = 2000 + +faith_unchanged_doctrine_cost_mult = 0.5 +faith_changed_doctrine_cost_mult_two_step = 1.50 +faith_changed_doctrine_cost_mult_three_step = 2.25 +faith_changed_doctrine_cost_mult_four_step = 3.50 + +faith_tenet_discount_mountain_background_value = 0.75 + +hostility_multiplier_pluralism = 0.5 +hostility_multiplier_righteous = 1 +hostility_multiplier_fundamentalist = 2 +hostility_multiplier_reduction_adaptive = -0.25 + +heretical_defector_fervor_gain = 15 # How much fervor Old Faith gains when a ruler splits off to a New Heresy + +regional_heresy_factor = { + if = { + limit = { has_game_rule = default_regional_heresy } + value = 5 + } + else_if = { + limit = { has_game_rule = strict_regional_heresy } + value = 200 + } + else = { + value = 1 + } +} + +meditation_duration = 185 # In days + +faction_county_opinion_astray = { + value = county_opinion + multiply = -1.0 +} +faction_county_opinion_hostile = { + value = county_opinion + multiply = -2.5 +} +faction_county_opinion_evil = { + value = county_opinion + multiply = -5.0 +} + +head_of_faith_selection_weight = { + value = 1 + + # Strong weight for preferred gender + if = { + limit = { + faith = { has_doctrine = doctrine_gender_male_dominated } + is_male = yes + } + add = 50 + } + else_if = { + limit = { + faith = { has_doctrine = doctrine_gender_female_dominated } + is_female = yes + } + add = 50 + } + + # Bonus for holding land, especially if it is a holy site. + if = { + limit = { + any_sub_realm_barony = { + is_holy_site_of = root.faith + } + } + add = 40 + } + add = { + value = highest_held_title_tier + multiply = 20 + } + + # Bonus for piousness/learnedness + add = { + value = num_virtuous_traits + multiply = 30 + } + add = { + value = num_sinful_traits + multiply = -30 + } + add = { + value = piety_level + multiply = 10 + } + add = { + value = learning + multiply = 2 + } + add = { + value = diplomacy + multiply = 1 + } +} +################ +# Demand Conversion chance calculation +################ + +#Calculated in scope:recipient +demand_conversion_learning_difference = { + add = scope:actor.learning + subtract = learning + multiply = 5 +} + +demand_conversion_fervor_difference = { + add = scope:actor.faith.fervor + subtract = faith.fervor +} + +demand_conversion_tenet_impact = { + value = 0 + if = { + limit = { + faith = { + has_doctrine_parameter = sanctioned_false_conversion + NOT = { has_doctrine_parameter = unattractive_for_character_conversions } + } + } + add = -20 + } + if = { + limit = { + faith = { has_doctrine_parameter = tenet_adaptive_conversion_resistance } + } + add = -20 + } + if = { + limit = { + faith = { has_doctrine_parameter = unattractive_for_character_conversions } + } + add = 20 + } +} + +demand_conversion_likelihood_calculation = { + #Five times actor's-recipient's learning + add = demand_conversion_learning_difference + + #Calculate each faith's fervor + add = demand_conversion_fervor_difference + + #Calculate various Doctrines and Tenets + add = demand_conversion_tenet_impact + + if = { + limit = { + opinion = { + target = scope:actor + value < medium_negative_opinion + } + } + add = -50 + } + else_if = { + limit = { + opinion = { + target = scope:actor + value < neutral_opinion + } + } + add = -25 + } + else_if = { + limit = { + opinion = { + target = scope:actor + value >= medium_positive_opinion + } + } + add = 50 + } + else_if = { + limit = { + opinion = { + target = scope:actor + value > neutral_opinion + } + } + add = 25 + } + + if = { + limit = { + scope:actor = { has_trait = savior } + } + add = 30 + } + if = { + limit = { + scope:actor = { has_trait = divine_blood } + } + add = 15 + } + + if = { + limit = { + has_trait = zealous + } + add = -50 + } + if = { + limit = { + has_trait = cynical + } + add = 30 + } + + if = { + limit = { + has_trait = heresiarch + } + add = -100 + } + + #Add value if refusing is a Crime + if = { + limit = { + scope:actor = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + } + add = 50 + } + + + + if = { + limit = { + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + } + add = 10 + } + if = { + limit = { + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + } + add = 20 + } + + max = 100 +} + +demand_conversion_bribe_size = { + value = medium_gold_value +} + +demand_conversion_piety_cost = { + value = medium_piety_value +} + + +#Religious Legal Pronouncement requirements +religious_legal_pronouncement_target_value = -20 + +religious_legal_pronouncement_sinful_value = { + value = 0 + add = scope:recipient.num_sinful_traits + multiply = 6 +} + +religious_legal_pronouncement_virtuous_value = { + value = 0 + add = scope:recipient.num_virtuous_traits + multiply = 5 +} + +religious_legal_pronouncement_requirements = { + value = religious_legal_pronouncement_target_value + add = religious_legal_pronouncement_sinful_value + subtract = religious_legal_pronouncement_virtuous_value + add = scope:actor.learning +} + +religious_legal_pronouncement_learning_requirement = { + value = 0 + subtract = religious_legal_pronouncement_sinful_value + add = religious_legal_pronouncement_virtuous_value + subtract = religious_legal_pronouncement_target_value + min = 1 +} + +claim_piety_value = { + value = { + add = minor_piety_value + multiply = 2 + if = { + limit = { + scope:target = { + tier = tier_duchy + } + } + multiply = 2 + } + if = { + limit = { + scope:target = { + tier = tier_kingdom + } + } + multiply = 4 + } + if = { + limit = { + scope:target = { + tier = tier_empire + } + } + multiply = 8 + } + add = { + value = scope:actor.sub_realm_size + multiply = 10 + } + # Landless adventurers can't get cheap access to legitimists without putting in some leg-work. + if = { + limit = { + scope:actor = { is_landless_adventurer = yes } + } + multiply = 10 + } + } +} + +#GHW Targeting Multipliers +#Up the base size of kingdoms with an existing same-faith ruler a bit: +ghw_target_existing_same_faith_ruler = 20 +#Prioritise reclaiming lands that are core rather than just new large kingdoms: +ghw_target_heartlands = 150 +ghw_target_frontier = 25 +ghw_target_fringe = 15 +ghw_target_stretch = 10 +#Always buff any kingdom containing an uncontrolled holy site: +ghw_target_has_holy_site = 6 +#Targets that should always be priorities if not controlled: +ghw_target_jerusalem = 200 +ghw_target_key_religious_holding = 100 +ghw_target_religious_vengeance = 150 +#Distance modifiers stack: +ghw_target_distance_01_reduction = 0.8 +ghw_target_distance_02_reduction = 0.1 +ghw_target_distance_03_reduction = 0.01 +ghw_target_distance_01_threshold = 722500 +ghw_target_distance_02_threshold = 1445000 +ghw_target_distance_03_threshold = 2167500 + +# Referenced by code when building list of ghw targets +# Logic reworked by Ewan Cowhig Croft +great_holy_war_target_kingdom_weight = { + # WEIGHTING PROCESS + # 1. Check how many individual counties within a de jure kingdom have a top-liege with an eligible faith for GHWing. Boost the count a little for kingdoms with existing same-faith monarchs. + # 2. Modify the count by region location & relative importance to the Faith (is this kingdom in the heartlands of the faith, or one of an increasing gradiant of frontier regions?). + # 3. Modify the count by region distance from the HoF's capital, or a fallback holy site. + # 4. Weight up kingdoms containing holy sites directly. + # 5. Weight up special priority targets (e.g., Jerusalem, Mecca) directly. + + ### 1 ### + # Is the target kingdom a viable GHW target? + every_in_de_jure_hierarchy = { + # Check individual counties within the potential target de jure kingdom. + continue = { tier > tier_county } + # For every county with a GHWable liege... + limit = { + tier = tier_county + scope:the_faith = { + is_hostile_enough_for_holy_war_trigger = { FAITH = prev.holder.top_liege.faith } + } + } + # ... Add 1 to the weighting. + add = 1 + } + # Weight up the kingdom if it either has an existing same-faith holder, or at least a same-faith claimant. + if = { + limit = { + OR = { + AND = { + exists = holder + holder.faith = scope:the_faith + } + any_claimant = { + exists = this + faith = scope:the_faith + is_available_adult = yes + } + } + } + add = ghw_target_existing_same_faith_ruler + } + + ### 2 ### + ### Abrahamics & Zoroastrians + # Documentation = { + # Avoid adding lots of reckless GHW stretch goals, as it'll mess up the targeting if every religion has a dozen apiece. + + # Below is an organised, prioritised list of the different target regions for each religion. Update it as you make changes. + # Christianity + # ghw_region_northern_italy # heartlands + # ghw_region_thessalonika # heartlands + # ghw_region_ethiopia # heartlands + # ghw_region_france # heartlands + # ghw_region_germany # heartlands + # ghw_region_greece # heartlands + # ghw_region_england # heartlands + # ghw_region_caucasus # heartlands + # ghw_region_anatolia # frontier + # ghw_region_near_east # frontier + # ghw_region_mediterranean # frontier + # ghw_region_balkans # frontier + # ghw_region_holy_land # frontier + # ghw_region_iberia # frontier + # ghw_region_celtic # fringe + # ghw_region_germanic # fringe + # ghw_region_central_european # fringe + # ghw_region_baltic # stretch + + # Islam + # ghw_region_holy_land # heartlands + # ghw_region_arabia # heartlands + # ghw_region_near_east # heartlands + # ghw_region_egypt # heartlands + # ghw_region_persia # heartlands + # ghw_region_north_africa # heartlands + # ghw_region_sicily # frontier + # ghw_region_iberia # frontier + # ghw_region_anatolia # frontier + # ghw_region_afghanistan # frontier + # ghw_region_the_sahel # fringe + # ghw_region_mediterranean # fringe + # ghw_region_western_india # fringe + # ghw_region_southern_france # fringe + + # Yazidism + # ghw_region_kurdistan # heartlands + # ghw_region_southern_middle_east # frontier + # ghw_region_eastern_middle_east # frontier + # ghw_region_caucasus # frontier + # ghw_region_caspian_steppe # fringe + # ghw_region_arabia # fringe + # ghw_region_holy_land # fringe + + # Judaism + # ghw_region_holy_land # heartlands + # ghw_region_arabia # frontier + # ghw_region_near_east # frontier + # ghw_region_egypt # frontier + # ghw_region_anatolia # fringe + # ghw_region_persia # fringe + # ghw_region_ethiopia # fringe + + # Zoroastrianism/Dualism + # ghw_region_persia # heartlands + # ghw_region_afghanistan # frontier + # ghw_region_near_east # frontier + # ghw_region_arabia # fringe + # ghw_region_holy_land # fringe + # ghw_region_anatolia # fringe + # ghw_region_mongolia # fringe + # ghw_region_western_india # fringe + + # Norse Paganism + # ghw_region_scandinavia # heartlands + # ghw_region_britannia # frontier + # ghw_region_saxony # frontier + # ghw_region_russia # frontier + # ghw_region_baltic # fringe + # ghw_region_poland # fringe + # ghw_region_thessalonika # stretch + + # Baltic Paganism + # ghw_region_baltic # heartlands + # ghw_region_poland # frontier + # ghw_region_russia # frontier + # ghw_region_scandinavia # fringe + # ghw_region_steppe # fringe + # ghw_region_hungary # fringe + + # Slavic Paganism + # ghw_region_wendish_lands # heartlands + # ghw_region_balkans # heartlands + # ghw_region_russia # heartlands + # ghw_region_hungary # frontier + # ghw_region_steppe # frontier + # ghw_region_mainland_greece # fringe + # ghw_region_germany # fringe + # ghw_region_italy # stretch + + # Finnish Paganism + # ghw_region_finland_&_estonia # heartlands + # ghw_region_northern_russia # heartlands + # ghw_region_steppe # heartlands + # ghw_region_scandinavia # frontier + # ghw_region_baltic # frontier + # ghw_region_southern_russia # frontier + # ghw_region_siberia # frontier + # ghw_region_transoxiana # fringe + # ghw_region_mongolia # fringe + + # Tengri Paganism + # ghw_region_mongolia # heartlands + # ghw_region_siberia # heartlands + # ghw_region_steppe # heartlands + # ghw_region_russia # frontier + # ghw_region_transoxiana # frontier + # ghw_region_hungary # frontier + # ghw_region_tibet # fringe + # ghw_region_wendish_lands # fringe + + # Magyar Paganism + # ghw_region_hungary # heartlands + # ghw_region_balkans # frontier + # ghw_region_crimea # frontier + # ghw_region_poland_bohemia_bavaria # frontier + # ghw_region_southern_russia # frontier + # ghw_region_mainland_greece # fringe + # ghw_region_baltic # fringe + + # Bon Paganism, Qiangicism, Donyipoloism, & Mundhumism + # ghw_region_tibet # heartlands + # ghw_region_northern_india # frontier + # ghw_region_khotan # frontier + # ghw_region_mongolia # fringe + # ghw_region_transoxiana # fringe + # ghw_region_southern_india # stretch + + # Mande Paganism & Senegambian Paganism + # ghw_region_the_sahel # heartlands + # ghw_region_subsahelian_africa # frontier + # ghw_region_north_african_interior # frontier + # ghw_region_western_sahara # frontier + # ghw_region_north_africa # fringe + + # Hausan Paganism + # ghw_region_north_african_interior # heartlands + # ghw_region_the_sahel # frontier + # ghw_region_subsahelian_africa # frontier + # ghw_region_ethiopia # frontier + # ghw_region_eastern_sahara # frontier + # ghw_region_horn_of_africa # fringe + # ghw_region_egypt_et_al # fringe + # ghw_region_north_africa # fringe + + # Akan Paganism & Yoruba Paganism + # ghw_region_subsahelian_africa # heartlands + # ghw_region_the_sahel # frontier + # ghw_region_north_african_interior # frontier + # ghw_region_western_sahara # frontier + # ghw_region_north_africa # fringe + + # Kushite Paganism + # ghw_region_egypt_et_al # heartlands + # ghw_region_north_african_interior # frontier + # ghw_region_ethiopia # frontier + # ghw_region_horn_of_africa # frontier + # ghw_region_the_sahel # fringe + # ghw_region_subsahelian_africa # fringe + # ghw_region_eastern_sahara # fringe + # ghw_region_north_africa # fringe + # ghw_region_holy_land # stretch + # ghw_region_arabia # stretch + + # Waaqi Paganism + # ghw_region_horn_of_africa # heartlands + # ghw_region_ethiopia # frontier + # ghw_region_egypt_et_al # frontier + # ghw_region_arabia # frontier + # ghw_region_north_african_interior # fringe + # ghw_region_holy_land # fringe + + # Zunist Paganism + # ghw_region_afghanistan # heartlands + # ghw_region_western_india # frontier + # ghw_region_persia # frontier + # ghw_region_transoxiana # frontier + # ghw_region_caucasus # fringe + # ghw_region_holy_land # fringe + # ghw_region_near_east # fringe + # ghw_region_southwestern_india # fringe + # ghw_region_egypt # stretch + + # Hellenic Paganism + # ghw_region_mainland_greece # heartlands + # ghw_region_italy # heartlands + # ghw_region_anatolia # frontier + # ghw_region_balkans # frontier + # ghw_region_near_east # frontier + # ghw_region_holy_land # fringe + # ghw_region_egypt # fringe + # ghw_region_north_africa # fringe + # ghw_region_southern_france # fringe + + # Hinduism + # Hinduism prioritises the Sacred River above the rest of the sub-continent. + # ghw_region_the_ganges # heartlands + # ghw_region_non_ganges_india # frontier + # ghw_region_tibet # fringe + # ghw_region_afghanistan # fringe + # ghw_region_persia # fringe + + # Jainism + # How did you even *manage* to get a game that needs this? + # ghw_region_gujarat_&_rajputana # heartlands + # ghw_region_non_gujarat_or_rajputana_india # frontier + # ghw_region_tibet # fringe + # ghw_region_afghanistan # fringe + # ghw_region_persia # fringe + + # Buddhism Theravada + # ghw_region_lanka_&_bengal # heartlands + # ghw_region_middle_india # frontier + # ghw_region_western_india # fringe + + # Buddhism Mahayana & Vajrayana + # ghw_region_tibet # heartlands + # ghw_region_mongolia # heartlands + # ghw_region_khotan # frontier + # ghw_region_siberia # frontier + # ghw_region_transoxiana # fringe + # ghw_region_afghanistan # fringe + + # Taoism + # ghw_region_mongolia # heartlands + # ghw_region_siberia # frontier + # ghw_region_tibet # frontier + # ghw_region_north_eastern_india # fringe + # } + + # Christian heartlands + if = { + limit = { + scope:the_faith.religion = religion:christianity_religion + OR = { + AND = { + # Catholic sphere. + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_northern_italy + geographical_region = ghw_region_france + geographical_region = ghw_region_germany + geographical_region = ghw_region_england + } + } + } + AND = { + # Orthodox sphere. + scope:the_faith = { not_non_orthodox_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_thessalonika + geographical_region = ghw_region_greece + } + } + } + AND = { + # Coptic sphere. + scope:the_faith = { not_non_coptic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { geographical_region = ghw_region_ethiopia } + } + AND = { + # Armenian sphere. + scope:the_faith = { not_non_armenian_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { geographical_region = ghw_region_caucasus } + } + } + } + add = ghw_target_heartlands + } + # Christian frontier + else_if = { + limit = { + scope:the_faith.religion = religion:christianity_religion + OR = { + AND = { + # Shared Orthodox/Armenian sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_orthodox_standard_christian_faith_trigger = yes + not_non_armenian_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { geographical_region = ghw_region_anatolia } + } + AND = { + # Shared Catholic/Orthodox/Armenian sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + not_non_armenian_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_near_east + geographical_region = ghw_region_egypt + } + } + } + AND = { + # Shared Catholic/Orthodox sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mediterranean + geographical_region = ghw_region_balkans + } + } + } + AND = { + # Shared Catholic/Orthodox/Armenian sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + not_non_armenian_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { geographical_region = ghw_region_holy_land } + } + AND = { + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { geographical_region = ghw_region_iberia } + } + } + } + add = ghw_target_frontier + } + # Christian fringe + else_if = { + limit = { + scope:the_faith.religion = religion:christianity_religion + OR = { + AND = { + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_celtic + geographical_region = ghw_region_germanic + geographical_region = ghw_region_finland_&_estonia + } + } + } + AND = { + # Shared Catholic/Orthodox sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { geographical_region = ghw_region_central_european } + } + } + } + add = ghw_target_fringe + } + # Christian stretch goal + else_if = { + limit = { + AND = { + scope:the_faith = { + religion = religion:christianity_religion + not_non_catholic_standard_christian_faith_trigger = yes + } + title_capital_county.title_province = { geographical_region = ghw_region_baltic } + } + } + add = ghw_target_stretch + } + # Muslim heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:islam_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_holy_land + geographical_region = ghw_region_arabia + geographical_region = ghw_region_near_east + geographical_region = ghw_region_egypt + geographical_region = ghw_region_persia + geographical_region = ghw_region_north_africa + } + } + } + add = ghw_target_heartlands + } + # Muslim frontier + else_if = { + limit = { + scope:the_faith.religion = religion:islam_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_sicily + geographical_region = ghw_region_iberia + geographical_region = ghw_region_anatolia + geographical_region = ghw_region_afghanistan + } + } + } + add = ghw_target_frontier + } + # Muslim fringe + else_if = { + limit = { + scope:the_faith.religion = religion:islam_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_the_sahel + geographical_region = ghw_region_mediterranean + geographical_region = ghw_region_western_india + geographical_region = ghw_region_southern_france + } + } + } + add = ghw_target_fringe + } + # Yazidi heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:yazidi_religion + title_capital_county.title_province = { geographical_region = ghw_region_kurdistan } + } + add = ghw_target_heartlands + } + # Yazidi frontier + else_if = { + limit = { + scope:the_faith.religion = religion:yazidi_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_southern_middle_east + geographical_region = ghw_region_eastern_middle_east + geographical_region = ghw_region_caucasus + } + } + } + add = ghw_target_frontier + } + # Yazidi fringe + else_if = { + limit = { + scope:the_faith.religion = religion:yazidi_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_caspian_steppe + geographical_region = ghw_region_arabia + geographical_region = ghw_region_holy_land + } + } + } + add = ghw_target_fringe + } + # Jewish heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:judaism_religion + title_capital_county.title_province = { geographical_region = ghw_region_holy_land } + } + add = ghw_target_heartlands + } + # Jewish frontier + else_if = { + limit = { + scope:the_faith.religion = religion:judaism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_arabia + geographical_region = ghw_region_near_east + geographical_region = ghw_region_egypt + } + } + } + add = ghw_target_frontier + } + # Jewish fringe + else_if = { + limit = { + scope:the_faith.religion = religion:judaism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_anatolia + geographical_region = ghw_region_persia + geographical_region = ghw_region_ethiopia + } + } + } + add = ghw_target_fringe + } + # Zoroastrian/Dualist heartlands + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:zoroastrianism_religion + this = religion:dualism_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_persia } + } + add = ghw_target_heartlands + } + # Zoroastrian/Dualist frontier + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:zoroastrianism_religion + this = religion:dualism_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_afghanistan + geographical_region = ghw_region_near_east + } + } + } + add = ghw_target_frontier + } + # Zoroastrian/Dualist fringe + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:zoroastrianism_religion + this = religion:dualism_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_arabia + geographical_region = ghw_region_holy_land + geographical_region = ghw_region_anatolia + geographical_region = ghw_region_mongolia + geographical_region = ghw_region_western_india + } + } + } + add = ghw_target_fringe + } + + ### Pagans + # Norse heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:germanic_religion + title_capital_county.title_province = { geographical_region = ghw_region_scandinavia } + } + add = ghw_target_heartlands + } + # Norse frontier + else_if = { + limit = { + scope:the_faith.religion = religion:germanic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_britannia + geographical_region = ghw_region_saxony + geographical_region = ghw_region_russia + } + } + } + add = ghw_target_frontier + } + # Norse fringe + else_if = { + limit = { + scope:the_faith.religion = religion:germanic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_baltic + geographical_region = ghw_region_poland + } + } + } + add = ghw_target_fringe + } + # Norse stretch goal + else_if = { + limit = { + scope:the_faith.religion = religion:germanic_religion + title_capital_county.title_province = { geographical_region = ghw_region_thessalonika } + } + add = ghw_target_stretch + } + # Baltic heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:baltic_religion + title_capital_county.title_province = { geographical_region = ghw_region_baltic } + } + add = ghw_target_heartlands + } + # Baltic frontier + else_if = { + limit = { + scope:the_faith.religion = religion:baltic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_poland + geographical_region = ghw_region_russia + } + } + } + add = ghw_target_frontier + } + # Baltic fringe + else_if = { + limit = { + scope:the_faith.religion = religion:baltic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_scandinavia + geographical_region = ghw_region_steppe + geographical_region = ghw_region_hungary + } + } + } + add = ghw_target_fringe + } + # Slavic heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:slavic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_wendish_lands + geographical_region = ghw_region_balkans + geographical_region = ghw_region_russia + } + } + } + add = ghw_target_heartlands + } + # Slavic frontier + else_if = { + limit = { + scope:the_faith.religion = religion:slavic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_hungary + geographical_region = ghw_region_steppe + } + } + } + add = ghw_target_frontier + } + # Slavic fringe + else_if = { + limit = { + scope:the_faith.religion = religion:slavic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mainland_greece + geographical_region = ghw_region_germany + } + } + } + add = ghw_target_fringe + } + # Slavic stretch goal + else_if = { + limit = { + scope:the_faith.religion = religion:slavic_religion + title_capital_county.title_province = { geographical_region = ghw_region_italy } + } + add = ghw_target_stretch + } + # Finnish & Siberian heartlands + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:finno_ugric_religion + this = religion:siberian_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_finland_&_estonia + geographical_region = ghw_region_northern_russia + geographical_region = ghw_region_steppe + } + } + } + add = ghw_target_heartlands + } + # Finnish & Siberian frontier + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:finno_ugric_religion + this = religion:siberian_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_scandinavia + geographical_region = ghw_region_baltic + geographical_region = ghw_region_southern_russia + geographical_region = ghw_region_siberia + } + } + } + add = ghw_target_frontier + } + # Finnish & Siberian fringe + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:finno_ugric_religion + this = religion:siberian_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_transoxiana + geographical_region = ghw_region_mongolia + } + } + } + add = ghw_target_fringe + } + # Tengri heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:tengrism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mongolia + geographical_region = ghw_region_siberia + geographical_region = ghw_region_steppe + } + } + } + add = ghw_target_heartlands + } + # Tengri frontier + else_if = { + limit = { + scope:the_faith.religion = religion:tengrism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_russia + geographical_region = ghw_region_transoxiana + geographical_region = ghw_region_hungary + } + } + } + add = ghw_target_frontier + } + # Tengri fringe + else_if = { + limit = { + scope:the_faith.religion = religion:tengrism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_tibet + geographical_region = ghw_region_wendish_lands + } + } + } + add = ghw_target_fringe + } + # Magyar heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:magyar_religion + title_capital_county.title_province = { geographical_region = ghw_region_hungary } + } + add = ghw_target_heartlands + } + # Magyar frontier + else_if = { + limit = { + scope:the_faith.religion = religion:magyar_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_balkans + geographical_region = ghw_region_crimea + geographical_region = ghw_region_poland_bohemia_bavaria + geographical_region = ghw_region_southern_russia + } + } + } + add = ghw_target_frontier + } + # Magyar fringe + else_if = { + limit = { + scope:the_faith.religion = religion:magyar_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mainland_greece + geographical_region = ghw_region_baltic + } + } + } + add = ghw_target_fringe + } + # Bon/Qiangicism/Donyipoloism/Mundhumism heartlands + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_tibet } + } + add = ghw_target_heartlands + } + # Bon/Qiangicism/Donyipoloism/Mundhumism frontier + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_northern_india + geographical_region = ghw_region_khotan + } + } + } + add = ghw_target_frontier + } + # Bon/Qiangicism/Donyipoloism/Mundhumism fringe + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mongolia + geographical_region = ghw_region_transoxiana + } + } + } + add = ghw_target_fringe + } + # Bon/Qiangicism/Donyipoloism/Mundhumism stretch goal + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_southern_india } + } + add = ghw_target_stretch + } + # Mande Paganism & Senegambian Paganism heartlands + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:west_african_roog_religion + this = religion:west_african_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_the_sahel } + } + add = ghw_target_heartlands + } + # Mande Paganism & Senegambian Paganism frontier + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:west_african_roog_religion + this = religion:west_african_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_subsahelian_africa + geographical_region = ghw_region_north_african_interior + geographical_region = ghw_region_western_sahara + } + } + } + add = ghw_target_frontier + } + # Mande Paganism & Senegambian Paganism fringe + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:west_african_roog_religion + this = religion:west_african_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_north_africa } + } + add = ghw_target_fringe + } + # Hausan Paganism heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:west_african_bori_religion + title_capital_county.title_province = { geographical_region = ghw_region_north_african_interior } + } + add = ghw_target_heartlands + } + # Hausan Paganism frontier + else_if = { + limit = { + scope:the_faith.religion = religion:west_african_bori_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_the_sahel + geographical_region = ghw_region_subsahelian_africa + geographical_region = ghw_region_ethiopia + geographical_region = ghw_region_eastern_sahara + } + } + } + add = ghw_target_frontier + } + # Hausan Paganism fringe + else_if = { + limit = { + scope:the_faith.religion = religion:west_african_bori_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_horn_of_africa + geographical_region = ghw_region_egypt_et_al + geographical_region = ghw_region_north_africa + } + } + } + add = ghw_target_fringe + } + # Akan Paganism & Yoruba Paganism heartlands + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:akom_religion + this = religion:west_african_orisha_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_subsahelian_africa } + } + add = ghw_target_heartlands + } + # Akan Paganism & Yoruba Paganism frontier + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:akom_religion + this = religion:west_african_orisha_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_the_sahel + geographical_region = ghw_region_north_african_interior + geographical_region = ghw_region_western_sahara + } + } + } + add = ghw_target_frontier + } + # Akan Paganism & Yoruba Paganism fringe + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:akom_religion + this = religion:west_african_orisha_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_north_africa } + } + add = ghw_target_fringe + } + # Kushite Paganism heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:kushitism_religion + title_capital_county.title_province = { geographical_region = ghw_region_egypt_et_al } + } + add = ghw_target_heartlands + } + # Kushite Paganism frontier + else_if = { + limit = { + scope:the_faith.religion = religion:kushitism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_north_african_interior + geographical_region = ghw_region_ethiopia + geographical_region = ghw_region_ethiopia + geographical_region = ghw_region_horn_of_africa + } + } + } + add = ghw_target_frontier + } + # Kushite Paganism fringe + else_if = { + limit = { + scope:the_faith.religion = religion:kushitism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_the_sahel + geographical_region = ghw_region_subsahelian_africa + geographical_region = ghw_region_north_africa + geographical_region = ghw_region_north_africa + } + } + } + add = ghw_target_fringe + } + # Kushite Paganism stretch goals + else_if = { + limit = { + scope:the_faith.religion = religion:kushitism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_holy_land + geographical_region = ghw_region_arabia + } + } + } + add = ghw_target_stretch + } + # Waaqi Paganism heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:waaqism_religion + title_capital_county.title_province = { geographical_region = ghw_region_horn_of_africa } + } + add = ghw_target_heartlands + } + # Waaqi Paganism frontier + else_if = { + limit = { + scope:the_faith.religion = religion:waaqism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_ethiopia + geographical_region = ghw_region_egypt_et_al + geographical_region = ghw_region_arabia + } + } + } + add = ghw_target_frontier + } + # Waaqi Paganism fringe + else_if = { + limit = { + scope:the_faith.religion = religion:waaqism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_north_african_interior + geographical_region = ghw_region_holy_land + } + } + } + add = ghw_target_fringe + } + # Zunist heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:zunism_religion + title_capital_county.title_province = { geographical_region = ghw_region_afghanistan } + } + add = ghw_target_heartlands + } + # Zunist frontier + else_if = { + limit = { + scope:the_faith.religion = religion:zunism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_western_india + geographical_region = ghw_region_persia + geographical_region = ghw_region_transoxiana + } + } + } + add = ghw_target_frontier + } + # Zunist fringe + else_if = { + limit = { + scope:the_faith.religion = religion:zunism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_caucasus + geographical_region = ghw_region_holy_land + geographical_region = ghw_region_near_east + geographical_region = ghw_region_southwestern_india + } + } + } + add = ghw_target_fringe + } + # Zunist stretch goal + else_if = { + limit = { + scope:the_faith.religion = religion:zunism_religion + title_capital_county.title_province = { geographical_region = ghw_region_egypt } + } + add = ghw_target_stretch + } + # Hellenic heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:hellenism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mainland_greece + geographical_region = ghw_region_italy + } + } + } + add = ghw_target_heartlands + } + # Hellenic frontier + else_if = { + limit = { + scope:the_faith.religion = religion:hellenism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_anatolia + geographical_region = ghw_region_balkans + geographical_region = ghw_region_near_east + } + } + } + add = ghw_target_frontier + } + # Hellenic fringe + else_if = { + limit = { + scope:the_faith.religion = religion:hellenism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_holy_land + geographical_region = ghw_region_egypt + geographical_region = ghw_region_north_africa + geographical_region = ghw_region_southern_france + } + } + } + add = ghw_target_fringe + } + + ### Eastern + # Hindu heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:hinduism_religion + title_capital_county.title_province = { geographical_region = ghw_region_the_ganges } + } + add = ghw_target_heartlands + } + # Hindu frontier + else_if = { + limit = { + scope:the_faith.religion = religion:hinduism_religion + title_capital_county.title_province = { geographical_region = ghw_region_non_ganges_india } + } + add = ghw_target_frontier + } + # Hindu fringe + else_if = { + limit = { + scope:the_faith.religion = religion:hinduism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_tibet + geographical_region = ghw_region_afghanistan + geographical_region = ghw_region_persia + } + } + } + add = ghw_target_fringe + } + # Jain heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:jainism_religion + title_capital_county.title_province = { geographical_region = ghw_region_gujarat_&_rajputana } + } + add = ghw_target_heartlands + } + # Jain frontier + else_if = { + limit = { + scope:the_faith.religion = religion:jainism_religion + title_capital_county.title_province = { geographical_region = ghw_region_non_gujarat_or_rajputana_india } + } + add = ghw_target_frontier + } + # Jain fringe + else_if = { + limit = { + scope:the_faith.religion = religion:jainism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_tibet + geographical_region = ghw_region_afghanistan + geographical_region = ghw_region_persia + } + } + } + add = ghw_target_fringe + } + # Theravada Buddhist heartlands + else_if = { + limit = { + scope:the_faith = { + religion = religion:buddhism_religion + NOR = { + this = faith:mahayana + this = faith:vajrayana + } + } + title_capital_county.title_province = { geographical_region = ghw_region_lanka_&_bengal } + } + add = ghw_target_heartlands + } + # Theravada Buddhist frontier + else_if = { + limit = { + scope:the_faith = { + religion = religion:buddhism_religion + NOR = { + this = faith:mahayana + this = faith:vajrayana + } + } + title_capital_county.title_province = { geographical_region = ghw_region_middle_india } + } + add = ghw_target_frontier + } + # Theravada Buddhist fringe + else_if = { + limit = { + scope:the_faith = { + religion = religion:buddhism_religion + NOR = { + this = faith:mahayana + this = faith:vajrayana + } + } + title_capital_county.title_province = { geographical_region = ghw_region_western_india } + } + add = ghw_target_fringe + } + # Mahayana & Vajrayana Buddhist heartlands + else_if = { + limit = { + scope:the_faith = { + religion = religion:buddhism_religion + NOT = { this = faith:theravada } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_tibet + geographical_region = ghw_region_mongolia + } + } + } + add = ghw_target_heartlands + } + # Mahayana & Vajrayana Buddhist frontier + else_if = { + limit = { + scope:the_faith = { + religion = religion:buddhism_religion + NOT = { this = faith:theravada } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_khotan + geographical_region = ghw_region_siberia + } + } + } + add = ghw_target_frontier + } + # Mahayana & Vajrayana Buddhist fringe + else_if = { + limit = { + scope:the_faith = { + religion = religion:buddhism_religion + NOT = { this = faith:theravada } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_transoxiana + geographical_region = ghw_region_afghanistan + } + } + } + add = ghw_target_fringe + } + # Taoist heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:taoism_religion + title_capital_county.title_province = { geographical_region = ghw_region_mongolia } + } + add = ghw_target_heartlands + } + # Taoist frontier + else_if = { + limit = { + scope:the_faith.religion = religion:taoism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_siberia + geographical_region = ghw_region_tibet + } + } + } + add = ghw_target_frontier + } + # Taoist fringe + else_if = { + limit = { + scope:the_faith.religion = religion:taoism_religion + title_capital_county.title_province = { geographical_region = ghw_region_north_eastern_india } + } + add = ghw_target_fringe + } + + ### 3 ### + # Factor in the potential target's distance from the faith. + # Distance: Rome to Jerusalem-ish + # If the HoF is landed, use them. + if = { + limit = { + exists = scope:the_faith.religious_head.capital_county + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = scope:the_faith.religious_head.capital_county + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Otherwise, use a preset fallback holy site. + else = { + # Christianity + if = { + limit = { scope:the_faith.religion = religion:christianity_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_roma + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Islam + else_if = { + limit = { scope:the_faith.religion = religion:islam_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mecca + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Judaism + else_if = { + limit = { scope:the_faith.religion = religion:judaism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_jerusalem + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Zoroastrianism & Dualism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:zoroastrianism_religion + this = religion:dualism_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_baduspan + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Asatru Paganism + else_if = { + limit = { scope:the_faith.religion = religion:germanic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_upland + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Vidilist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:baltic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_braslau + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Slovianskan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:slavic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kiev + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Ukonusko & Turumic Paganism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:finno_ugric_religion + this = religion:siberian_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kakisalmi + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Tengri Paganism + else_if = { + limit = { scope:the_faith.religion = religion:tengrism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_qayaliq + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Taltosist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:magyar_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_visegrad + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Bon/Qiangicism/Donyipoloism/Mundhumism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_khotan + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Mande Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_awkar + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Senegambian Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_roog_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kasa + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Hausan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_bori_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_daura + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Akan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:akom_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kumasi + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Yoruba Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_orisha_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_owu + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Kushite Paganism + else_if = { + limit = { scope:the_faith.religion = religion:kushitism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_aswan + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Waaqi Paganism + else_if = { + limit = { scope:the_faith.religion = religion:waaqism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mogadishu + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Zunist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:zunism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kabul + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Hellenic Paganism + else_if = { + limit = { scope:the_faith.religion = religion:hellenism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_roma + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Hinduism + else_if = { + limit = { scope:the_faith.religion = religion:hinduism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mathura + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Jainism + else_if = { + limit = { scope:the_faith.religion = religion:jainism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_somnath + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Buddhism + else_if = { + limit = { scope:the_faith.religion = religion:buddhism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_gaya + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Taoism + else_if = { + limit = { scope:the_faith.religion = religion:taoism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_wuluhai + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + } + # Distance: Rome to Afghanistan-ish + # If the HoF is landed, use them. + if = { + limit = { + scope:the_faith.religious_head = { is_playable_character = yes } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = scope:the_faith.religious_head.capital_county + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Otherwise, use a preset fallback holy site. + else = { + # Christianity + if = { + limit = { scope:the_faith.religion = religion:christianity_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_roma + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Islam + else_if = { + limit = { scope:the_faith.religion = religion:islam_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mecca + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Judaism + else_if = { + limit = { scope:the_faith.religion = religion:judaism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_jerusalem + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Zoroastrianism & Dualism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:zoroastrianism_religion + this = religion:dualism_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_baduspan + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Asatru Paganism + else_if = { + limit = { scope:the_faith.religion = religion:germanic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_upland + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Vidilist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:baltic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_braslau + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Slovianskan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:slavic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kiev + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Ukonusko & Turumic Paganism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:finno_ugric_religion + this = religion:siberian_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kakisalmi + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Tengri Paganism + else_if = { + limit = { scope:the_faith.religion = religion:tengrism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_qayaliq + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Taltosist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:magyar_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_visegrad + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Bon/Qiangicism/Donyipoloism/Mundhumism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_khotan + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Mande Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_awkar + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Senegambian Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_roog_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kasa + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Hausan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_bori_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_daura + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Akan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:akom_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kumasi + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Yoruba Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_orisha_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_owu + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Kushite Paganism + else_if = { + limit = { scope:the_faith.religion = religion:kushitism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_aswan + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Waaqi Paganism + else_if = { + limit = { scope:the_faith.religion = religion:waaqism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mogadishu + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Zunist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:zunism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kabul + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Hellenic Paganism + else_if = { + limit = { scope:the_faith.religion = religion:hellenism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_roma + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Hinduism + else_if = { + limit = { scope:the_faith.religion = religion:hinduism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mathura + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Jainism + else_if = { + limit = { scope:the_faith.religion = religion:jainism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_somnath + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Buddhism + else_if = { + limit = { scope:the_faith.religion = religion:buddhism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_gaya + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Taoism + else_if = { + limit = { scope:the_faith.religion = religion:taoism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_wuluhai + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + } + # Distance: Rome to Bengal-ish + # If the HoF is landed, use them. + if = { + limit = { + scope:the_faith.religious_head = { is_playable_character = yes } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = scope:the_faith.religious_head.capital_county + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Otherwise, use a preset fallback holy site. + else = { + # Christianity + if = { + limit = { scope:the_faith.religion = religion:christianity_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_roma + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Islam + else_if = { + limit = { scope:the_faith.religion = religion:islam_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mecca + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Judaism + else_if = { + limit = { scope:the_faith.religion = religion:judaism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_jerusalem + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Zoroastrianism & Dualism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:zoroastrianism_religion + this = religion:dualism_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_baduspan + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Asatru Paganism + else_if = { + limit = { scope:the_faith.religion = religion:germanic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_upland + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Vidilist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:baltic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_braslau + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Slovianskan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:slavic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kiev + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Ukonusko & Turumic Paganism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:finno_ugric_religion + this = religion:siberian_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kakisalmi + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Tengri Paganism + else_if = { + limit = { scope:the_faith.religion = religion:tengrism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_qayaliq + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Taltosist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:magyar_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_visegrad + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Bon/Qiangicism/Donyipoloism/Mundhumism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_khotan + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Mande Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_awkar + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Senegambian Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_roog_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kasa + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Hausan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_bori_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_daura + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Akan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:akom_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kumasi + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Yoruba Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_orisha_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_owu + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Kushite Paganism + else_if = { + limit = { scope:the_faith.religion = religion:kushitism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_aswan + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Waaqi Paganism + else_if = { + limit = { scope:the_faith.religion = religion:waaqism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mogadishu + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Zunist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:zunism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kabul + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Hellenic Paganism + else_if = { + limit = { scope:the_faith.religion = religion:hellenism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_roma + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Hinduism + else_if = { + limit = { scope:the_faith.religion = religion:hinduism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mathura + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Jainism + else_if = { + limit = { scope:the_faith.religion = religion:jainism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_somnath + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Buddhism + else_if = { + limit = { scope:the_faith.religion = religion:buddhism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_gaya + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Taoism + else_if = { + limit = { scope:the_faith.religion = religion:taoism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_wuluhai + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + } + + # Weigh down certain areas slightly + if = { + limit = { + scope:the_faith.religion = religion:christianity_religion + # Shared Catholic/Orthodox sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { + geographical_region = ghw_region_north_africa + } + } + multiply = 0.7 + } + else_if = { + limit = { + scope:the_faith.religion = religion:christianity_religion + # Shared Catholic/Orthodox sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_western_sahara + geographical_region = ghw_region_eastern_sahara + geographical_region = ghw_region_the_sahel + geographical_region = ghw_region_north_african_interior + geographical_region = ghw_region_subsahelian_africa + } + } + } + multiply = 0.001 + } + + ### 4 ### + # Always weight-up kingdoms containing holy sites. + if = { + limit = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + multiply = ghw_target_has_holy_site + } + + ### 5 ### + # Christian & Jewish preference for Jerusalem + if = { + limit = { + # Belongs to a Christian or Jewish religion. + OR = { + scope:the_faith.religion = religion:christianity_religion + scope:the_faith.religion = religion:judaism_religion + } + # Not a non-Catholic standard Christian faith. + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + # Definitely actually considers Jerusalem holy. + title:c_jerusalem = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + # There's a GHWable kingdom in the area. + title_capital_county.title_province = { geographical_region = ghw_region_jerusalem } + } + add = ghw_target_jerusalem + } + # Muslim preference for Mecca & Medina + if = { + limit = { + # Belongs to an Islamic religion. + scope:the_faith.religion = religion:islam_religion + # Not the Qarmatians. Since they weren't exactly fans of the Holy Cities. + NOT = { scope:the_faith = faith:qarmatian } + # Definitely actually considers at least Mecca or Medina holy. + OR = { + title:c_mecca = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + title:c_medina = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + } + # There's a GHWable kingdom in the area. + title_capital_county.title_province = { geographical_region = ghw_region_arabia } + } + add = ghw_target_key_religious_holding + } + # A defender in the region HumSac'd your HoF + if = { + limit = { + any_in_de_jure_hierarchy = { + continue = { tier > tier_county } + tier = tier_county + holder = { + AND = { + has_variable_list = humsacd_hofs + is_target_in_variable_list = { + name = humsacd_hofs + target = scope:the_faith + } + } + scope:the_faith = { + is_hostile_enough_for_holy_war_trigger = { FAITH = top_liege.faith } + } + } + } + } + multiply = ghw_target_religious_vengeance + } +} + +great_holy_war_pledge_amount = { + value = root.yearly_character_income + min = 10 +} + +# Referenced in code; don't delete this. When determining GHW participation score, the character's score from the war is multiplied by this. ROOT is the character +ghw_score_mult = { + value = 1 + if = { + limit = { + this = faith.religious_head + faith = { has_doctrine = doctrine_spiritual_head } # Temporal heads get credit + } + value = 0 + } +} + +# Referenced in code; don't delete this. When determining GHW participation score, the character's score percentage is capped at this. ROOT is the character +ghw_max_score_percentage = { + value = 20 +} + +# Referenced in code; don't delete this. Used by the GHW screen to show the player how much of the pot they'll get when the war starts. Should be used where you hand it out: divide_war_chest = { fraction = ghw_war_start_handout_percentage } +ghw_war_start_handout_percentage = { + value = 0.2 +} + +# Referenced in code; don't delete this +# When a holy war is declared, everyone of the defender's faith that passes can_defensively_join_holy_war will be scored using this +# Scores above 0 will join +# Scope is the potential joiner +# scope:attacker is the attacker +# scope:defender is the defender +holy_war_defensive_join_value = { + add = { + desc = "BASE_VALUE" + value = -50 + format = "BASE_VALUE_FORMAT" + } + add = { + desc = "zealous_personality" + value = ai_zeal + } + + add = { + desc = "bold_personality" + value = ai_boldness + divide = 2 + } + + add = { # More fervent faiths are likelier to defend themselves en masse + desc = "high_fervor" + value = faith.fervor + divide = 5 # Max 20 + if = { + limit = { + ai_zeal < 0 + } + divide = 2 # Max 10 if not zealous + } + } + + if = { + limit = { + has_relation_rival = scope:attacker + } + add = { + desc = "you_are_rivals" + value = 200 + } + } + + if = { + limit = { + OR = { + has_relation_friend = scope:defender + has_relation_lover = scope:defender + } + } + add = { + desc = "friends_with_defender" + value = 200 + } + } + + # Less Likely if you dislike the target + if = { + limit = { + opinion = { target = scope:defender value <= -15 } + ai_zeal < 50 + } + add = { + desc = "dislikes_defender" + value = -25 + } + } + + # Much Less Likely if you really dislike the target + if = { + limit = { + opinion = { target = scope:defender value <= -50 } + ai_zeal < 50 + } + add = { + desc = "strongly_dislikes_defender" + value = -50 + } + } +} + +# Root = faith +faith_conversion_fervor_mult = { + value = define:NReligion|MAX_FERVOR + subtract = fervor + multiply = define:NReligion|FAITH_CREATION_FERVOR_DISCOUNT_PER_MISSING_FERVOR + max = define:NReligion|FAITH_CREATION_FERVOR_DISCOUNT_MAX + divide = define:NReligion|MAX_FERVOR +} + +# Modify (multiply) the doctrine cost when creating a faith. +# The returned value is interpreted as a multiplicative modifier (e.g. 0.5 means +50% cost). +# scope:character = the creation character +# scope:old_faith = the faith the character is converting from +faith_creation_cost_mult = { + subtract = { + value = scope:old_faith.faith_conversion_fervor_mult + desc = "faith_creation_cost_fervor_impact" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + } +} + +# Modify (multiply) the doctrine cost when converting to a faith. +# The returned value is interpreted as a multiplicative modifier (e.g. 0.5 means +50% cost). +# scope:character = the converting character +# scope:new_faith = the faith the character is converting to +# There should be no subtract equal or higher than 1 +faith_conversion_cost_mult = { + + #Adding 1 to apply properly the following multipliers + add = { + value = 1 + } + + # Try to always be cheaper than creating a new faith + if = { + limit = { + scope:character.learning > 0 + } + multiply = { + value = 1 + subtract = { + desc = "learning_modifier" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = scope:character.learning + divide = 100 + } + } + } + if = { + limit = { + always = yes + } + multiply = { + value = 1 + add = { + value = scope:new_faith.faith_conversion_fervor_mult + subtract = scope:character.faith.faith_conversion_fervor_mult + desc = "faith_conversion_cost_fervor_difference" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + } + } + } + # Try to always be cheaper than creating a new faith + if = { + limit = { + scope:new_faith.religion = scope:character.faith.religion + } + multiply = { + value = 1 + subtract = { + desc = "faith_conversion_cost_existing_faith" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + # Try to always be cheaper than creating a new faith + else = { + multiply = { + value = 1 + subtract = { + desc = "faith_conversion_cost_existing_faith" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.35 + } + } + } + # Pluralistic faiths have it easier converting to each other + if = { + limit = { + scope:new_faith = { has_doctrine = doctrine_pluralism_pluralistic } + scope:character.faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + multiply = { + value = 1 + subtract = { + desc = "faith_conversion_cost_pluralists" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.25 + } + } + } + # Pluralistic faiths have it easier converting + else_if = { + limit = { + scope:character.faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + multiply = { + value = 1 + subtract = { + desc = "faith_conversion_cost_pluralist" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.15 + } + } + } + + ############################################################### + # Converting TO an unreformed faith often has steep penalties # + ############################################################### + if = { + limit = { + scope:new_faith = { + has_doctrine_parameter = unreformed + } + } + + # Massive penalty if your current faith is reformed. + if = { + limit = { + scope:character = { + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + } + } + multiply = { + value = 1 + add = { + desc = "faith_conversion_cost_reformed_converting_to_unreformed" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 5 + } + } + + } + + # Minor stacking penalties depending on (non-tribal) government form. + if = { + limit = { + scope:character = { + government_has_flag = government_is_clan + } + } + multiply = { + value = 1 + add = { + desc = "faith_conversion_cost_clan_converting_to_unreformed" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.25 + } + } + } + else_if = { + limit = { + scope:character = { + government_has_flag = government_is_feudal + } + } + multiply = { + value = 1 + add = { + desc = "faith_conversion_cost_feudal_converting_to_unreformed" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + else_if = { + limit = { + scope:character = { + government_has_flag = government_is_republic + } + } + multiply = { + value = 1 + add = { + desc = "faith_conversion_cost_republic_converting_to_unreformed" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.75 + } + } + } + } + + ################################## + # Dead Religion/Faith penalty(s) # + ################################## + #More expensive to convert to a dead religion + if = { + limit = { + scope:new_faith = { + religion = { + any_faith = { + count = all + has_followers_trigger = no + } + } + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_dead_religion + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 5 + } + } + } + + ####################################### + # Switching religion/family penalties # + ####################################### + # More expensive if you convert to a faith outside of your religion's family + if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_abrahamic } + } + scope:character = { + faith = { + religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_other_religion_family + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 2 + } + } + } + if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_eastern } + } + scope:character = { + faith = { + religion = { + NOT = { is_in_family = rf_eastern } + } + } + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_other_religion_family + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 2 + } + } + } + if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_pagan } + } + scope:character = { + faith = { + religion = { NOT = { is_in_family = rf_pagan } } + } + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_other_religion_family + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 2 + } + } + } + + # Unreformed Faiths have an easier way converting to Organized faiths + if = { + limit = { + scope:new_faith = { + NOT = { + has_doctrine_parameter = unreformed + } + } + scope:character = { + faith = { + has_doctrine_parameter = unreformed + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_unreformed_to_organized + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + + # More expensive to convert to something inside your religion family that's not the same religion + if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_abrahamic } + } + scope:character = { + faith = { + religion = { + is_in_family = rf_abrahamic + NOT = { this = scope:new_faith.religion} + } + } + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_inside_religion_family + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 1 + } + } + } + if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_eastern } + } + scope:character = { + faith = { + religion = { + is_in_family = rf_eastern + NOT = { this = scope:new_faith.religion} + } + } + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_inside_religion_family + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 1 + } + } + } + if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_pagan } + } + scope:character = { + faith = { + religion = { + is_in_family = rf_pagan + NOT = { this = scope:new_faith.religion} + } + } + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_inside_religion_family + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 1 + } + } + } + + ####################################### + # Misc penalties # + ####################################### + # More expensive to convert to a faith who's HoF you HumSac'D/to a faith on good terms with one who's HoF you HumSac'd, unless they're chill with HumSac. + if = { + limit = { + scope:character = { + has_variable_list = humsacd_hofs + any_in_list = { + variable = humsacd_hofs + faith_hostility_level = { + target = scope:new_faith + value <= faith_astray_level + } + } + } + # Exemptions for people who already practice HumSac: they're likely not happy, but it's not the ultimate taboo for them. + scope:new_faith = { + NOT = { has_doctrine_parameter = human_sacrifice_active } + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_sacrificed_hof + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 5 + } + } + } + + ######################## + # Conversion Discounts # + ######################## + # Cheaper if you are targeted by the new Faith in a defensive Holy War + if = { + limit = { + scope:character = { + any_character_war = { + using_holy_war_cb_trigger = yes + is_defender = scope:character + } + } + } + if = { # Even cheaper if unreformed + limit = { + scope:new_faith = { + NOT = { has_doctrine_parameter = unreformed } + } + scope:character = { + faith = { + has_doctrine_parameter = unreformed + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_unreformed_holy_war + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + else = { # But still a sizable discount otherwise. + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_holy_war + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + } + # Cheaper if your spouse is of the faith + if = { + limit = { + scope:character = { + any_spouse = { + faith = scope:new_faith + } + } + } + if = { # Even cheaper if unreformed + limit = { + scope:new_faith = { + NOT = { has_doctrine_parameter = unreformed } + } + scope:character = { + faith = { + has_doctrine_parameter = unreformed + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_unreformed_spouse + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + else = { # But still a sizable discount otherwise. + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_spouse + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + } + # Does a concubine have the right religion? + else_if = { + limit = { + scope:character = { + any_concubine = { + faith = scope:new_faith + } + } + } + if = { # Even cheaper if unreformed + limit = { + scope:new_faith = { + NOT = { has_doctrine_parameter = unreformed } + } + scope:character = { + faith = { + has_doctrine_parameter = unreformed + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_unreformed_concubine + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + else = { # But still a sizable discount otherwise. + + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_concubine + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.25 + } + } + } + } + # Cheaper if the religion is present near/in your borders + if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_abrahamic } + } + scope:character = { + faith = { + religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + AND = { + exists = liege + liege = { + faith = scope:new_faith + } + } + AND = { + exists = liege + liege = { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + # Cheaper if the religion is present near/in your borders + else_if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_eastern } + } + scope:character = { + faith = { + religion = { + NOT = { is_in_family = rf_eastern } + } + } + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + AND = { + exists = liege + liege = { + faith = scope:new_faith + } + } + AND = { + exists = liege + liege = { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + # Cheaper if the religion is present near/in your borders + else_if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_pagan } + } + scope:character = { + faith = { + religion = { + NOT = { is_in_family = rf_pagan } + } + } + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + AND = { + exists = liege + liege = { + faith = scope:new_faith + } + } + AND = { + exists = liege + liege = { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + # Cheaper if the religion is present near/in your borders + else_if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_abrahamic } + } + scope:character = { + faith = { + religion = { + is_in_family = rf_abrahamic + NOT = { this = scope:new_faith.religion} + } + } + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + AND = { + exists = liege + liege = { + faith = scope:new_faith + } + } + AND = { + exists = liege + liege = { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.8 + } + } + } + # Cheaper if the religion is present near/in your borders + else_if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_eastern } + } + scope:character = { + faith = { + religion = { + is_in_family = rf_eastern + NOT = { this = scope:new_faith.religion} + } + } + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + AND = { + exists = liege + liege = { + faith = scope:new_faith + } + } + AND = { + exists = liege + liege = { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.8 + } + } + } + # Cheaper if the religion is present near/in your borders + else_if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_pagan } + } + scope:character = { + faith = { + religion = { + is_in_family = rf_pagan + NOT = { this = scope:new_faith.religion} + } + } + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + AND = { + exists = liege + liege = { + faith = scope:new_faith + } + } + AND = { + exists = liege + liege = { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.8 + } + } + } + else_if = { + limit = { + scope:character = { + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + AND = { + exists = liege + liege = { + faith = scope:new_faith + } + } + AND = { + exists = liege + liege = { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + # Cheaper if you're an interloper in a struggle converting to an involved faith. + if = { + limit = { + scope:character = { + any_character_struggle = { + involvement = interloper + has_struggle_phase_parameter = cheaper_to_convert_to_struggle_faith + is_faith_involved_in_struggle = scope:new_faith + } + } + } + multiply = { + value = 1 + subtract = { + desc = struggle_parameter_cheaper_to_convert_to_struggle_faith + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + + ######################################## + # Conversion Discounts from Traditions # + ######################################## + # scope:new_faith.religion = scope:character.faith.religion + + # Pacifism Tenet + if = { + limit = { + AND = { + scope:character= { + culture = { + has_cultural_parameter = reduced_cost_for_conversion_to_pacifist_faith + } + } + scope:new_faith = { + has_doctrine = tenet_pacifism + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_tradition + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.25 + } + } + } + + #################################### + # Conversion Discounts from Events # + #################################### + if = { + limit = { + scope:character = { + exists = var:discounted_faith_to_convert_to_var + } + scope:character.var:discounted_faith_to_convert_to_var = scope:new_faith + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_witch_event + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + + # Removing 1 to offset the value and present it as expected by the code + subtract = { + value = 1 + } + +} + +reincarnation_chance = 4 + +holy_sites_to_create_temporal_head_of_faith = 1 +holy_sites_to_create_spiritual_head_of_faith = 1 + +faith_military_strength = { + every_ruler = { + limit = { + faith = prev + is_at_war = no + } + add = max_military_strength + } +} + +syncretic_mutual_opinion_bonus_value = 30 + +ask_to_take_vows_piety_cost = { + value = { + add = medium_piety_value + if = { + limit = { exists = scope:actor } + if = { + limit = { + OR = { + is_child_of = scope:actor + "scope:actor.primary_title.place_in_line_of_succession(scope:recipient)" <= 3 + } + } + add = major_piety_value + } + } + else_if = { + limit = { is_close_family_of = scope:actor } + add = medium_piety_value + } + } +} + +# Simplified target kingdom weight for crusade specifically used to send help to Byzantium (ask_western_help_decision) + +great_holy_war_target_kingdom_weight_simplified = { + # Is the target kingdom a viable GHW target? + every_in_de_jure_hierarchy = { + # Check individual counties within the potential target de jure kingdom. + continue = { tier > tier_county } + # For every county with a GHWable liege... + limit = { + tier = tier_county + scope:the_faith = { + is_hostile_enough_for_holy_war_trigger = { FAITH = prev.holder.top_liege.faith } + } + } + add = 0.5 + } + # Weight up the kingdom if it either has an existing same-faith holder, or at least a same-faith claimant. + if = { + limit = { + OR = { + AND = { + exists = holder + holder.faith = scope:the_faith + } + any_claimant = { + exists = this + faith = scope:the_faith + is_available_adult = yes + } + } + } + add = ghw_target_existing_same_faith_ruler + } + # Christian heartlands + if = { + limit = { + OR = { + AND = { + # Catholic sphere. + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_northern_italy + geographical_region = ghw_region_france + geographical_region = ghw_region_germany + geographical_region = ghw_region_england + } + } + } + AND = { + # Orthodox sphere. + scope:the_faith = { not_non_orthodox_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_thessalonika + geographical_region = ghw_region_greece + } + } + } + AND = { + # Coptic sphere. + scope:the_faith = { not_non_coptic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { geographical_region = ghw_region_ethiopia } + } + AND = { + # Armenian sphere. + scope:the_faith = { not_non_armenian_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { geographical_region = ghw_region_caucasus } + } + } + } + add = ghw_target_heartlands + } + # Christian frontier + else_if = { + limit = { + OR = { + AND = { + # Shared Orthodox/Armenian sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_orthodox_standard_christian_faith_trigger = yes + not_non_armenian_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { geographical_region = ghw_region_anatolia } + } + AND = { + # Shared Catholic/Orthodox/Armenian sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + not_non_armenian_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_near_east + geographical_region = ghw_region_egypt + } + } + } + AND = { + # Shared Catholic/Orthodox sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mediterranean + geographical_region = ghw_region_balkans + } + } + } + AND = { + # Shared Catholic/Orthodox/Armenian sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + not_non_armenian_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { geographical_region = ghw_region_holy_land } + } + AND = { + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { geographical_region = ghw_region_iberia } + } + } + } + add = ghw_target_frontier + } + # Christian fringe + else_if = { + limit = { + OR = { + AND = { + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_celtic + geographical_region = ghw_region_germanic + geographical_region = ghw_region_finland_&_estonia + } + } + } + AND = { + # Shared Catholic/Orthodox sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { geographical_region = ghw_region_central_european } + } + } + } + add = ghw_target_fringe + } + # Christian stretch goal + else_if = { + limit = { + AND = { + scope:the_faith = { + religion = religion:christianity_religion + not_non_catholic_standard_christian_faith_trigger = yes + } + title_capital_county.title_province = { geographical_region = ghw_region_baltic } + } + } + add = ghw_target_stretch + } + # Prio to kingdoms that border Byzantium + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_byzantion + value <= ghw_target_distance_01_threshold + } + } + } + multiply = 1.3 + } + if = { + limit = { + any_title_to_title_neighboring_and_across_water_empire = { + this = title:e_byzantium + } + } + multiply = 2 + } + #Weight down farthest kingdoms + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_byzantion + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + # Always weight-up kingdoms containing holy sites. + if = { + limit = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + multiply = ghw_target_has_holy_site + } + # Christian preference for Jerusalem + if = { + limit = { + # Not a non-Catholic standard Christian faith. + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + # Definitely actually considers Jerusalem holy. + title:c_jerusalem = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + # There's a GHWable kingdom in the area. + title_capital_county.title_province = { geographical_region = ghw_region_jerusalem } + } + add = ghw_target_jerusalem + } + # A defender in the region HumSac'd your HoF + if = { + limit = { + any_in_de_jure_hierarchy = { + continue = { tier > tier_county } + tier = tier_county + holder = { + AND = { + has_variable_list = humsacd_hofs + is_target_in_variable_list = { + name = humsacd_hofs + target = scope:the_faith + } + } + scope:the_faith = { + is_hostile_enough_for_holy_war_trigger = { FAITH = top_liege.faith } + } + } + } + } + multiply = ghw_target_religious_vengeance + } +} diff --git a/common/script_values/03_dlc_fp2_script_values.txt b/common/script_values/03_dlc_fp2_script_values.txt new file mode 100644 index 00000000..1679b0ef --- /dev/null +++ b/common/script_values/03_dlc_fp2_script_values.txt @@ -0,0 +1,1152 @@ + +################################################## +# Interactions + +purchase_truce_interaction_small_sum = { value = medium_gold_value } + +purchase_truce_interaction_medium_sum = { value = major_gold_value } + +purchase_truce_interaction_major_sum = { value = massive_gold_value } + +# We only use this one for AI weighting, hence why it's a little jank. +purchase_truce_interaction_massive_sum = { + value = monumental_gold_value + multiply = 2 +} + +purchase_truce_interaction_truce_days_small_value = 3650 +purchase_truce_interaction_truce_days_medium_value = 5475 +purchase_truce_interaction_truce_days_large_value = 9125 + +purchase_truce_interaction_recipient_far_weaker_value = { + value = max_military_strength + multiply = 0.4 +} + +purchase_truce_interaction_recipient_somewhat_weaker_value = { + value = max_military_strength + multiply = 0.8 +} + +purchase_truce_interaction_recipient_somewhat_stronger_value = { + value = max_military_strength + multiply = 1.2 +} + +purchase_truce_interaction_recipient_far_stronger_value = { + value = max_military_strength + multiply = 1.6 +} + +challenge_to_chess_opinion_change_loser_value = 30 + +challenge_to_chess_opinion_change_loser_arrogant_value = { + value = challenge_to_chess_opinion_change_loser_value + multiply = -1 +} + +challenge_to_chess_stress_stake_value = { value = medium_stress_gain } + +challenge_to_chess_gold_change_value = { + value = 0 + + # To keep this balanced, we want to use the lowest income of scope:actor & scope:recipient. + if = { + limit = { scope:actor.monthly_character_income >= scope:recipient.monthly_character_income } + add = scope:recipient.monthly_character_income + } + else = { add = scope:actor.monthly_character_income } + # And, because month-to-month income isn't much, we take it up to a significant fraction of a year's earnings. + multiply = 9 +} + +bg_stake_land_evaluate_appropriate_county_ordering_value = { + value = 0 + # We want to get the *least* worthwhile county available. + ## Chiefly based off of development. + add = { + value = development_level + multiply = -1 + } + ## But control factors in a tad too. + add = { + value = county_control + multiply = -0.25 + } + # Weight up personal claims a bit. + if = { + limit = { + any_claimant = { this = scope:ordering_char_temp } + } + add = 50 + } +} + +bg_crit_success_add_value = 7 + +bg_success_add_value = 4 + +bg_failure_add_value = 2 + +bg_crit_failure_add_value = 0 + +bg_counter_mult_value = 0.5 + +bg_winning_threshold_value = 10 +bg_close_to_winning_threshold_value = 8 + +bg_relative_score_heavy_difference_threshold_value = { + value = 0 + add = scope:bg_opponent.var:bg_current_score + add = 4 +} +bg_relative_score_light_difference_threshold_value = { + value = 0 + add = scope:bg_opponent.var:bg_current_score + add = 2 +} + +# Note: the cap is considered hit at the *end* of this round. +bg_round_cap_value = 4 + +bg_cumulative_skill_score_value = { + value = 0 + # Pachisi + if = { + limit = { scope:bg_system = flag:pachisi } + add = diplomacy + add = intrigue + add = stewardship + } + # Hnefatafl + if = { + limit = { scope:bg_system = flag:hnefatafl } + add = intrigue + add = martial + add = prowess + } + # Tabula + if = { + limit = { scope:bg_system = flag:tabula } + add = intrigue + add = learning + add = stewardship + } + # Go + if = { + limit = { scope:bg_system = flag:go } + add = learning + add = martial + add = intrigue + } + # Fidchell + if = { + limit = { scope:bg_system = flag:fidchell } + add = learning + add = prowess + add = diplomacy + } + # Chess + if = { + limit = { scope:bg_system = flag:chess } + add = martial + add = intrigue + add = learning + } +} + +bg_cumulative_skill_score_comparison_value = { + value = 0 + if = { + limit = { exists = scope:bg_myself } + add = scope:bg_myself.bg_cumulative_skill_score_value + } + if = { + limit = { exists = scope:bg_opponent } + subtract = scope:bg_opponent.bg_cumulative_skill_score_value + } +} + +bg_bad_player_threshold_value = 24 +bg_average_player_threshold_value = 36 +bg_good_player_threshold_value = 48 + +offer_assistance_interaction_gold_value = { + value = 0 + if = { + limit = { exists = scope:contract_assistance_helper } + add = scope:contract_assistance_helper.max_military_strength + } + divide = scope:recipient.max_military_strength + if = { + limit = { + exists = scope:contract_assistance_helper + scope:contract_assistance_helper.max_military_strength > scope:recipient.max_military_strength + } + multiply = 120 + } + else = { + multiply = 60 + } + multiply = { + value = 1 + if = { + limit = { exists = scope:contract_assistance_helper } + if = { + limit = { scope:contract_assistance_helper = { has_trait = greedy } } + add = 0.5 + } + else_if = { + limit = { scope:contract_assistance_helper = { has_trait = generous } } + subtract = 0.5 + } + } + } + if = { + limit = { + scope:contract_assistance_helper.domicile ?= { has_domicile_parameter = camp_improved_mercenary_contract_rewards } + } + multiply = camp_improved_mercenary_contract_rewards_value + } + if = { + limit = { + scope:contract_assistance_helper ?= { has_perk = hard_rule_perk } + } + multiply = adventurer_hard_rule_contract_rewards_value + } + round = yes + max = gold + min = 25 +} + +offer_assistance_interaction_gold_modifier_value = { + value = scope:recipient.gold + divide = 100 + floor = yes + max = 5 +} + +offer_assistance_interaction_already_winning_value = 50 + +offer_assistance_interaction_already_losing_value = 25 + +offer_assistance_interaction_war_contribution_value = { + value = 0 + if = { + limit = { exists = scope:contract_assistance_helper } + add = scope:contract_assistance_helper.max_military_strength + } + if = { + limit = { + scope:recipient ?= { + any_war_ally = { #if you are the only war ally, you are the only one contributing to the war participation score, thus you cannot fulfill + count = 1 + } + } + } + divide = 4 + } + else_if = { + limit = { + scope:recipient ?= { + any_war_ally = { + count > 1 + } + } + } + scope:recipient ?= { + every_war_ally = { + divide = { + value = 4 + subtract = 1 + min = 1 + } + } + } + } + max = 2000 + round = yes +} + +saved_contribution_value = { + value = 0 + if = { + limit = { + exists = scope:contract_assistance_helper + exists = scope:contract_assistance_helper.var:owed_contract_assistance_contribution + } + add = scope:contract_assistance_helper.var:owed_contract_assistance_contribution + } + else = { + add = offer_assistance_interaction_war_contribution_value + if = { + limit = { + scope:recipient ?= { + any_war_ally = { + count = 0 + } + } + } + divide = 4 + } + else_if = { + limit = { + scope:recipient ?= { + any_war_ally = { + count >= 1 + } + } + } + scope:recipient ?= { + every_war_ally = { + divide = { + value = 4 + subtract = 1 + min = 1 + } + } + } + } + } + max = 2000 + min = 100 + if = { + limit = { + scope:laamp_temp ?= { + has_character_flag = joined_as_mercenary + } + } + value = 1 + } +} + +################################################## +# Decisions + +improve_city_province_decision_cost = 75 + +appoint_a_righteous_caliph_decision_same_faith_county_count = 10 + +appoint_a_righteous_caliph_decision_own_max_sins = 2 + +appoint_a_righteous_caliph_decision_hof_min_sins = 2 + +mozarabic_fate_county_count = 12 + +favour_the_countryside_basques_decision_basque_pagan_virtues_tally_value = 2 + +favour_the_countryside_basques_decision_counties_to_control_value = 9 + +council_of_toledo_decision_decision_cooldown_value = 25 + +council_of_toledo_piety_cost_value = 250 + +council_of_toledo_gold_cost_value = 100 + +council_of_toledo_realm_size_value = 20 + +council_toledo_conversion_modifier_value = 1.5 + +council_toledo_culture_acceptance_value = 10 + +council_toledo_modifier_duration_value = 10 + +council_toledo_success_guest_value = 3 + +council_of_toledo_counter_value = { + value = 0 + if = { + limit = { exists = global_var:council_of_toledo_counter } + add = global_var:council_of_toledo_counter + } +} + +council_of_toledo_counter_less_one_value = { + value = council_of_toledo_counter_value + subtract = 1 +} + +council_toledo_divided_svalue = { + value = council_of_toledo_counter_value + divide = 10 +} + +council_toledo_divided_floor_svalue = { + value = council_of_toledo_counter_value + divide = 10 + floor = yes +} + +council_toledo_divided_1_svalue = { + value = council_of_toledo_counter_value + subtract = 1 + divide = 10 +} + +council_toledo_divided_2_svalue = { + value = council_of_toledo_counter_value + subtract = 2 + divide = 10 +} + +council_toledo_divided_3_svalue = { + value = council_of_toledo_counter_value + subtract = 3 + divide = 10 +} + +council_toledo_divided_4_svalue = { + value = council_of_toledo_counter_value + subtract = 4 + divide = 10 +} + +council_toledo_divided_5_svalue = { + value = council_of_toledo_counter_value + subtract = 5 + divide = 10 +} + +council_toledo_divided_6_svalue = { + value = council_of_toledo_counter_value + subtract = 6 + divide = 10 +} + +council_toledo_divided_7_svalue = { + value = council_of_toledo_counter_value + subtract = 7 + divide = 10 +} + +council_toledo_divided_8_svalue = { + value = council_of_toledo_counter_value + subtract = 8 + divide = 10 +} + +council_toledo_divided_9_svalue = { + value = council_of_toledo_counter_value + subtract = 9 + divide = 10 +} + +################################################## +# Council Tasks + +court_chaplain_fabricate_claim_cheaper_for_involved_parties_in_struggle_region_value = { + value = 0 + add = court_chaplain_fabricate_claim_base_total + multiply = 0.50 +} + +################################################## +# Casus Belli + +fp2_border_raid_control_change_value = -25 + +fp2_border_raid_development_change_value = -1 + +fp2_border_raid_gold_change_value = { + value = prev.development_level + multiply = 5 + if = { + limit = { exists = scope:raid_province } + add = fp2_border_raid_building_gold_value + } +} + +fp2_border_raid_building_gold_value = { + value = 25 +} + +fp2_border_raid_ai_targeting_value = { + value = 0.5 + scope:attacker = { + # Weight up religious enemies. + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:defender.faith + value > faith_astray_level + } + } + } + add = 0.5 + } + # Weight up developed realms. + every_in_list = { + list = target_titles + limit = { development_level >= 8 } + add = 0.25 + } + every_in_list = { + list = target_titles + limit = { + any_county_province = { num_buildings >= 3 } + } + add = 0.25 + } + if = { + limit = { + scope:defender = { is_at_war = yes } + } + add = 0.25 + } + if = { + limit = { + NOT = { + scope:attacker.ai_greed = 0 + } + } + add = { + value = scope:attacker.ai_greed + divide = 100 + } + } + } +} + +siege_occupier_county_soldier_value = { + value = 0 + if = { + limit = { exists = scope:war } + scope:war = { + every_war_attacker = { + limit = { + any_army = { + location = { is_in_list = occupied_baronies } + } + } + every_army = { + limit = { + location = { is_in_list = occupied_baronies } + } + add = army_size + } + } + } + } +} + +destroy_building_soldier_multiplier_value = { + value = siege_occupier_county_soldier_value # 5000 + divide = 100000 # 0.5 + add = 1 # 1.5 +} + +destroy_building_development_multiplier_value = { + value = barony.county.development_level # 11 + divide = 20 # 0.5 + add = 1 +} + +fp2_expel_interloper_ai_targeting_value = { + value = 100 + scope:attacker = { + # Weight up religious enemies. + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:defender.faith + value > faith_astray_level + } + } + } + add = 100 + } + # Weight up culture enemies. + if = { + limit = { + culture = { + cultural_acceptance = { + target = scope:defender.culture + value < -25 + } + } + } + add = 100 + } + } + # Weight up with interloper land + scope:defender = { + every_realm_county = { + limit = { target_is_de_jure_liege_or_above = title:e_spain } + add = fp2_expel_interloper_county_cost_value + } + } +} + +fp2_expel_interloper_county_cost_value = 25 + +################################################## +# Dynasty Legacies + +fp2_urbanism_legacy_1_bonus_value = 0.2 + +fp2_urbanism_legacy_1_bonus_value_percentage = { + value = fp2_urbanism_legacy_1_bonus_value + multiply = 100 +} + +################################################## +# Decisions + +##### Struggle Ending Decisions ##### + +### Common + +# Counts every county in region, to check against +struggle_iberia_ending_ending_decision_region_total_value = { + value = 0 + every_county_in_region = { + region = world_europe_west_iberia + add = 1 + } +} + +# Counts independent involved realms in Iberia, to compare +struggle_iberia_ending_ending_decision_foreign_realm_total_value = { + value = 0 + struggle:iberian_struggle = { + every_involved_ruler = { + limit = { + NOT = { this = root } + is_independent_ruler = yes + is_landless_adventurer = no + primary_title = { is_holy_order = no } + primary_title = { is_mercenary_company = no } + } + add = 1 + } + } +} + +# Counts completely controlled de jure kingdoms of Hispania +fp2_struggle_ending_kingdom_counter_value = { + every_held_title = { + limit = { + tier = tier_kingdom + de_jure_liege = title:e_spain + root = { completely_controls = prev } + } + add = 1 + } +} + +### Hostility + +# Parameter for conversion speed multiplier +fp2_struggle_hostility_conversion_value = 1.5 + +# Parameter for culture and faith opinion loss +fp2_struggle_hostility_opinion_value = 15 + +fp2_struggle_hostility_opinion_negative_value = -30 + +# Paramter for cultural acceptance loss +fp2_struggle_hostility_culture_acceptance_value = -50 + +fp2_struggle_hostility_culture_acceptance_large_value = -75 + +# Counter for de jure capital kingdom's total counties +fp2_struggle_hostility_county_total_value = { + value = 0 + capital_county.kingdom = { + every_de_jure_county = { add = 1 } + } +} + +fp2_struggle_hostility_county_total_light_value = { + value = fp2_struggle_hostility_county_total_value + multiply = 0.75 + ceiling = yes +} + +# Counter for de jure capital kingdom's same culture and faith counties +fp2_struggle_hostility_county_counter_value = { + value = 0 + capital_county.kingdom = { + every_de_jure_county = { + limit = { + culture = root.culture + faith = root.faith + } + add = 1 + } + } +} + +# Counter for other rulers who own too much of Iberia +fp2_struggle_hostility_region_counter_value = { + struggle:iberian_struggle = { + every_involved_ruler = { + limit = { + NOT = { this = root } + is_independent_ruler = yes + primary_title = { is_holy_order = no } + primary_title = { is_mercenary_company = no } + any_county_in_region = { + region = world_europe_west_iberia + percent > fp2_struggle_hostility_region_percent_decimal_value # set by fp2_struggle_hostility_region_percent_value + holder.top_liege = prev + } + } + add = 1 + } + } +} + +# Paramater for de jure kingdoms required +fp2_struggle_hostility_kingdom_total_value = 2 + +# Paramameter for percentage of Iberia that no other ruler can control +fp2_struggle_hostility_region_percent_value = 20 + +# Uses above to plug in to script as a decimal +fp2_struggle_hostility_region_percent_decimal_value = { + value = fp2_struggle_hostility_region_percent_value + divide = 100 + max = 1 +} + +### Compromise + +# Counter for controlled counties in Iberia +struggle_iberia_ending_compromise_decision_region_owned_value = { + value = 0 + every_county_in_region = { + region = world_europe_west_iberia + limit = { holder.top_liege = root } + add = 1 + } +} + +# Percentage of Iberian counties owned +struggle_iberia_ending_compromise_decision_region_owned_percent_value = { + value = struggle_iberia_ending_compromise_decision_region_owned_value + divide = struggle_iberia_ending_ending_decision_region_total_value + multiply = 100 +} + +# Parameter for mininmum opinion +struggle_iberia_ending_compromise_decision_opinion_value = { + value = 60 +} + +# Counter for hooked and friendly rulers +struggle_iberia_ending_compromise_decision_opinion_counter_value = { + value = 0 + struggle:iberian_struggle = { + every_involved_ruler = { + limit = { + NOT = { this = root } + is_independent_ruler = yes + primary_title = { is_holy_order = no } + primary_title = { is_mercenary_company = no } + is_landless_adventurer = no + save_temporary_scope_as = this_character + OR = { + root = { has_strong_hook = scope:this_character } + opinion = { + target = root + value >= struggle_iberia_ending_compromise_decision_opinion_value + } + } + } + add = 1 + } + } +} + +# Counter for Iberian counties owned by non-Involved +struggle_iberia_ending_compromise_decision_region_interloper_value = { + value = 0 + every_county_in_region = { + region = world_europe_west_iberia + limit = { + holder.top_liege = { fp2_character_involved_in_struggle_trigger = no } + } + add = 1 + } +} + +# Percentage of Iberian counties owned by non-Involved +struggle_iberia_ending_compromise_decision_region_interloper_percent_value = { + value = struggle_iberia_ending_compromise_decision_region_interloper_value + divide = struggle_iberia_ending_ending_decision_region_total_value + multiply = 100 +} + +# Counter for independent king or higher Involved rulers +struggle_iberia_ending_compromise_decision_independent_counter_value = { + value = 0 + struggle:iberian_struggle = { + every_involved_ruler = { + limit = { + NOT = { this = root } + is_independent_ruler = yes + primary_title = { + is_mercenary_company = no + is_holy_order = no + tier >= tier_kingdom + } + } + add = 1 + } + } +} + +# Counter for inter-Involved character wars +struggle_iberia_ending_compromise_decision_war_counter_value = { + struggle:iberian_struggle = { + every_involved_ruler = { + limit = { + is_independent_ruler = yes + primary_title = { is_mercenary_company = no } + primary_title = { is_holy_order = no } + any_primary_war_enemy = { + is_independent_ruler = yes + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + } + primary_title = { is_holy_order = no } + primary_title = { is_mercenary_company = no } + } + } + add = { + value = 0 + if = { + limit = { + any_character_war = { + OR = { + AND = { + primary_attacker = prev + primary_defender = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + } + is_independent_ruler = yes + primary_title = { is_mercenary_company = no } + } + } + AND = { + primary_defender = prev + primary_attacker = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + } + is_independent_ruler = yes + primary_title = { is_mercenary_company = no } + } + } + } + } + } + add = 0.5 # they are both primary participant so they will add 0.5 each + } + else = { + add = 1 # only one of them is primary participant, so we need to add 1 + } + } + } + } +} + +# Paramameter for percentage of Iberia that you cannot control +fp2_struggle_compromise_owned_percent_value = 50 + +# Uses above to plug in to script as a decimal +fp2_struggle_compromise_owned_percent_decimal_value = { + value = fp2_struggle_compromise_owned_percent_value + divide = 100 + max = 1 +} + +# Paramameter for percentage of Iberia that no other Involved ruler can control +fp2_struggle_compromise_involved_percent_value = 50 + +# Uses above to plug in to script as a decimal +fp2_struggle_compromise_involved_percent_decimal_value = { + value = fp2_struggle_compromise_involved_percent_value + divide = 100 + max = 1 +} + +# Paramameter for percentage of Iberia that no Uninvolved ruler can control +fp2_struggle_compromise_uninvolved_percent_value = 25 + +# Uses above to plug in to script as a decimal +fp2_struggle_compromise_uninvolved_percent_decimal_value = { + value = fp2_struggle_compromise_uninvolved_percent_value + divide = 100 + max = 1 +} + +### Conciliation + +# Counter for allied Involved rulers +struggle_iberia_ending_conciliation_decision_alliance_counter_value = { + value = 0 + struggle:iberian_struggle = { + every_involved_ruler = { + limit = { + NOT = { this = root } + is_independent_ruler = yes + is_landless_adventurer = no + primary_title = { is_holy_order = no } + primary_title = { is_mercenary_company = no } + is_allied_to = root + } + add = 1 + } + } +} + +# Parameter for num de jure kingdoms of Iberia must be owned +fp2_struggle_conciliation_kingdom_total_value = 1 + +# Parameter for cultural acceptance gain +fp2_struggle_conciliation_culture_acceptance_value = 50 + +fp2_struggle_secure_iberian_foothold_years_value = 15 + +fp2_struggle_secure_iberian_foothold_faith_target_percent_value = 50 + +fp2_struggle_secure_iberian_foothold_faith_total_value = { + if = { + limit = { exists = scope:iberian_kingdom_temp } + scope:iberian_kingdom_temp = { + every_de_jure_county = { add = 1 } + } + } + min = 1 +} + +fp2_struggle_secure_iberian_foothold_faith_value = { + value = 0 + if = { + limit = { exists = scope:iberian_kingdom_temp } + scope:iberian_kingdom_temp = { + every_de_jure_county = { + limit = { faith = holder.top_liege.faith } + add = 1 + } + } + } + min = 1 +} + +fp2_struggle_secure_iberian_foothold_faith_percent_value = { + value = fp2_struggle_secure_iberian_foothold_faith_value + divide = fp2_struggle_secure_iberian_foothold_faith_total_value + multiply = 100 +} + +##### Religion values ##### + +# Total Iberian counties of my Religion +fp2_struggle_secure_iberian_foothold_religion_total_value = { + value = 0 + every_county_in_region = { + region = world_europe_west_iberia + limit = { religion = root.religion } + add = 1 + } +} + +# Held Iberian counties of my Religion +fp2_struggle_secure_iberian_foothold_religion_owned_value = { + value = 0 + every_county_in_region = { + region = world_europe_west_iberia + limit = { + religion = root.religion + holder.top_liege = root + } + add = 1 + } +} + +# Percentage owned Iberian counties of my Religion +fp2_struggle_secure_iberian_foothold_religion_percent_value = { + value = fp2_struggle_secure_iberian_foothold_religion_owned_value + divide = fp2_struggle_secure_iberian_foothold_religion_total_value + multiply = 100 + min = 1 +} + +# Target percentage owned Iberia counties of my Religion +fp2_struggle_secure_iberian_foothold_religion_target_percent_value = 50 + +fp2_struggle_secure_iberian_foothold_religion_target_percent_decimal_value = { + value = fp2_struggle_secure_iberian_foothold_religion_target_percent_value + divide = 100 +} + +##### Outsider values ##### + +# Target percentage owned counties of Iberia +fp2_struggle_secure_iberian_foothold_outsider_target_percent_value = 33 + +fp2_struggle_secure_iberian_foothold_outsider_target_percent_decimal_value = { + value = fp2_struggle_secure_iberian_foothold_outsider_target_percent_value + divide = 100 +} + +# Decimal target percentage owned counties of Iberia +fp2_struggle_secure_iberian_foothold_outsider_percent_decimal_value = { + value = fp2_struggle_secure_iberian_foothold_outsider_percent_value + divide = 100 + max = 1 +} + +# Percentage owned counties of Iberia +fp2_struggle_secure_iberian_foothold_outsider_percent_value = { + value = fp2_struggle_secure_iberian_foothold_outsider_value + divide = fp2_struggle_secure_iberian_foothold_outsider_total_value + multiply = 100 +} + +fp2_struggle_secure_iberian_foothold_outsider_total_value = { + value = 0 + every_county_in_region = { + region = world_europe_west_iberia + add = 1 + } +} + +fp2_struggle_secure_iberian_foothold_outsider_value = { + value = 0 + every_county_in_region = { + region = world_europe_west_iberia + limit = { holder.top_liege = root } + add = 1 + } +} + +fp2_enforce_truce_war_score_value = 25 + +fp2_enforce_truce_duration_value = 5 + +fp2_bargain_fealty_interaction_already_losing_value = 25 + +fp2_bargain_fealty_half_realm_size_value = { + value = scope:recipient.realm_size + divide = 2 +} + +fp2_bargain_fealty_half_max_strength_value = { + value = scope:actor.max_military_strength + divide = 2 +} + +################################################## +# Miscellaneous + +# We want them to always be born in 795 or so. +fp2_lyonese_monk_age_value = { + value = current_year + add = -795 +} + +fp2_lyonese_monk_conclave_cost_value = major_piety_value + +fp2_lyonese_monk_conversion_bonus_root_value = 0.5 + +fp2_lyonese_monk_conversion_bonus_actual_value = { + value = court_chaplain_conversion_base_total + multiply = fp2_lyonese_monk_conversion_bonus_root_value +} + + +floored_development_value = { + value = development_level + floor = yes +} + +floored_current_development_value = { + value = var:current_development_level + floor = yes +} + +pt_sum_small_value = { + value = 0 + add = { + # If scope:actor makes more money, we use them as a base. + if = { + limit = { scope:actor.yearly_character_income > scope:recipient.yearly_character_income } + add = scope:actor.purchase_truce_interaction_small_sum + } + # Otherwise, we take scope:recipient. + else = { add = scope:recipient.purchase_truce_interaction_small_sum } + } + # Struggle Reduction + if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = struggle_cheaper_buy_truce + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:recipient + } + } + } + multiply = 0.5 + } +} + +pt_sum_medium_value = { + value = 0 + # If scope:actor makes more money, we use them as a base. + if = { + limit = { scope:actor.yearly_character_income > scope:recipient.yearly_character_income } + add = scope:actor.purchase_truce_interaction_medium_sum + } + # Otherwise, we take scope:recipient. + else = { add = scope:recipient.purchase_truce_interaction_medium_sum } + + # Struggle Reduction + if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = struggle_cheaper_buy_truce + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:recipient + } + } + } + multiply = 0.5 + } +} + +pt_sum_large_value = { + value = 0 + # If scope:actor makes more money, we use them as a base. + if = { + limit = { scope:actor.yearly_character_income > scope:recipient.yearly_character_income } + add = scope:actor.purchase_truce_interaction_major_sum + } + # Otherwise, we take scope:recipient. + else = { add = scope:recipient.purchase_truce_interaction_major_sum } + + # Struggle Reduction + if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = struggle_cheaper_buy_truce + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:recipient + } + } + } + multiply = 0.5 + } +} diff --git a/common/script_values/04_ep2_hunt_values.txt b/common/script_values/04_ep2_hunt_values.txt new file mode 100644 index 00000000..86abd3f0 --- /dev/null +++ b/common/script_values/04_ep2_hunt_values.txt @@ -0,0 +1,1553 @@ +###################### +# HUNT STUFF +###################### + +hunt_activity_base_cost = { + value = standard_activity_base_cost + if = { + limit = { + has_character_modifier = peregrine_falcon + } + multiply = 0.9 + } + # Done like this so that it stacks + if = { + limit = { has_character_modifier = master_of_hunt_activity_bonus } + multiply = 0.9 + } + # Adventurer + if = { + limit = { is_landless_adventurer = yes } + multiply = 0.25 + } +} + +hunt_normal_option_cost = { + value = 10 + multiply = activity_cost_scale_by_tier + multiply = activity_cost_scale_by_era +} + +hunt_good_option_cost = { + value = 35 + multiply = activity_cost_scale_by_tier + multiply = activity_cost_scale_by_era +} + +standard_hunting_cooldown_time = { + value = 2 + if = { + limit = { + root.culture = { has_cultural_parameter = more_frequent_hunts } + } + multiply = 0.5 + } +} + +hunt_secondary_outcome = 1 +hunt_participants = 10 + +hunt_event_delay_min = 25 +hunt_event_delay_max = 35 + +min_default_hunt_events = 2 +max_default_hunt_events = 3 +chance_of_extra_hunt_events = 25 + +min_hunt_event_spacing = 2 +max_hunt_event_spacing = 4 + +hunt_activity_guest_list_size_value = { + value = 4 + if = { + limit = { primary_title.tier = tier_duchy } + add = 2 + } + else_if = { + limit = { primary_title.tier = tier_kingdom } + add = 4 + } + if = { + limit = { primary_title.tier >= tier_empire } + add = 6 + } +} + +hunt_prestige_guest_gain_value = { + value = hunt_prestige_reward_value + divide = 2 +} + +hunt_prestige_with_piety_guest_gain_value = { + value = hunt_prestige_with_piety_reward_value + divide = 2 +} + +hunt_piety_guest_gain_value = { + value = hunt_piety_reward_value + divide = 2 +} + +hunt_activity_success_increase_minor_value = 3 +hunt_activity_success_increase_medium_value = 5 +hunt_activity_success_increase_major_value = 10 +hunt_activity_success_increase_massive_value = 15 # use very sparingly, this is huge +hunt_activity_success_increase_adventurer_initial_medium_value = 30 +hunt_activity_success_increase_adventurer_initial_high_value = 50 + +hunt_activity_success_decrease_minor_value = { + value = hunt_activity_success_increase_minor_value + multiply = -1 +} +hunt_activity_success_decrease_medium_value = { + value = hunt_activity_success_increase_medium_value + multiply = -1 +} +hunt_activity_success_decrease_major_value = { + value = hunt_activity_success_increase_major_value + multiply = -1 +} +hunt_activity_success_decrease_massive_value = { + value = hunt_activity_success_increase_massive_value + multiply = -1 +} + +hunt_hunting_grounds_success_value = { + value = 0 + add = { + if = { + limit = { has_building = hunting_grounds_01 } + add = 3 + } + if = { + limit = { has_building = hunting_grounds_02 } + add = 6 + } + if = { + limit = { has_building = hunting_grounds_03 } + add = 9 + } + if = { + limit = { has_building = hunting_grounds_04 } + add = 12 + } + if = { + limit = { has_building = hunting_grounds_05 } + add = 15 + } + if = { + limit = { has_building = hunting_grounds_06 } + add = 18 + } + if = { + limit = { has_building = hunting_grounds_07 } + add = 21 + } + if = { + limit = { has_building = hunting_grounds_08 } + add = 24 + } + desc = hunt_success_chance.hunting_grounds + } + add = { + if = { + limit = { has_building = rainbow_mountains_01 } + add = 24 + } + desc = hunt_success_chance.rainbow_mountains_01 + } +} + +hunt_logging_camps_success_value = { + value = 0 + add = { + if = { + limit = { has_building = logging_camps_01 } + add = -3 + } + if = { + limit = { has_building = logging_camps_02 } + add = -6 + } + if = { + limit = { has_building = logging_camps_03 } + add = -9 + } + if = { + limit = { has_building = logging_camps_04 } + add = -12 + } + if = { + limit = { has_building = logging_camps_05 } + add = -15 + } + if = { + limit = { has_building = logging_camps_06 } + add = -18 + } + if = { + limit = { has_building = logging_camps_07 } + add = -21 + } + if = { + limit = { has_building = logging_camps_08 } + add = -24 + } + desc = hunt_success_chance.logging_camps + } +} + +hunt_royal_reserves_success_value = { + value = 0 + add = { + if = { + limit = { has_building = royal_forest_01 } + add = 6 + } + else_if = { + limit = { has_building = royal_forest_02 } + add = 12 + } + else_if = { + limit = { has_building = royal_forest_03 } + add = 18 + } + desc = hunt_success_chance.royal_forest + } +} + +hunt_success_chance_roco_amenity_level_value = { + value = 0 + if = { + limit = { + activity_host = { has_royal_court = yes } + has_dlc_feature = royal_court + } + if = { + limit = { + activity_host = { + amenity_level = { type = court_servants value = low_amenity_level } + } + } + add = 1 + } + else_if = { + limit = { + activity_host = { + amenity_level = { type = court_servants value = medium_amenity_level } + } + } + add = 2 + } + else_if = { + limit = { + activity_host = { + amenity_level = { type = court_servants value = high_amenity_level } + } + } + add = 3 + } + else_if = { + limit = { + activity_host = { + amenity_level = { type = court_servants value = very_high_amenity_level } + } + } + add = 4 + } + else_if = { + limit = { + activity_host = { + amenity_level = { type = court_servants value = max_amenity_level } + } + } + add = 5 + } + } + else = { add = 2 } +} + +hunt_success_chance_value = { + activity_host = { + ### HOST + # SKILLS + add = { + value = learning + divide = 4 + ceiling = yes + max = 10 + desc = learning_modifier + } + add = { + value = martial + divide = 8 + ceiling = yes + max = 10 + desc = martial_modifier + } + add = { + value = prowess + divide = 4 + ceiling = yes + max = 10 + desc = prowess_modifier + } + # TRAIT + add = { + value = 0 + if = { + limit = { has_trait = lifestyle_hunter } + add = 3 + } + if = { + limit = { + has_trait = lifestyle_hunter + involved_activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + has_trait_xp = { trait = lifestyle_hunter track = falconer value >= 25 } + } + add = { + value = 3 + if = { + limit = { + has_trait_xp = { trait = lifestyle_hunter track = falconer value >= 50 } + } + add = 3 + } + if = { + limit = { + has_trait_xp = { trait = lifestyle_hunter track = falconer value >= 75 } + } + add = 3 + } + } + } + else_if = { + limit = { + has_trait = lifestyle_hunter + involved_activity = { + NOT = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + } + has_trait_xp = { trait = lifestyle_hunter track = hunter value >= 25 } + } + add = { + value = 3 + if = { + limit = { + has_trait_xp = { trait = lifestyle_hunter track = hunter value >= 50 } + } + add = 3 + } + if = { + limit = { + has_trait_xp = { trait = lifestyle_hunter track = hunter value >= 75 } + } + add = 3 + } + } + } + desc = hunt_success_chance.trait + } + # MODIFIERS + if = { # Shrek + limit = { + has_character_modifier = hunt_guide_local_madman_modifier + var:hunt_guide_local_madman_place ?= involved_activity.activity_location.county + } + add = { + value = 5 + desc = hunt_success_chance.hunt_guide_local_madman_modifier + } + } + if = { # Tame Deer + limit = { + has_character_modifier = hunt_tame_deer_modifier + exists = involved_activity.var:animal_type + var:tame_animal_type ?= involved_activity.var:animal_type + } + add = { + value = 5 + desc = hunt_success_chance.hunt_tame_deer_modifier + } + } + if = { # Beastmaster + limit = { has_character_modifier = ep2_beastmaster_modifier } + add = { + value = 5 + desc = hunt_success_chance.ep2_beastmaster_modifier + } + } + if = { # Scenthound + limit = { + has_character_modifier = dog_story_scenthound_modifier + involved_activity = { + NOR = { + has_activity_option = { category = special_type option = hunt_type_falconry } + hunt_animal_type_dangerous_trigger = { VAR = var:animal_type } + } + } + } + add = { + value = 5 + desc = hunt_success_chance.dog_story_scenthound_modifier + } + } + if = { # Beasthound + limit = { + has_character_modifier = dog_story_beasthound_modifier + involved_activity = { + hunt_animal_type_dangerous_trigger = { VAR = var:animal_type } + NOT = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + } + } + add = { + value = 5 + desc = hunt_success_chance.dog_story_beasthound_modifier + } + } + # MASTER OF THE HUNT + if = { + limit = { exists = court_position:master_of_hunt_court_position } + add = { + value = 0 + court_position:master_of_hunt_court_position = { + if = { + limit = { + aptitude = { court_position = master_of_hunt_court_position value <= 1 } + } + add = 3 + } + else_if = { + limit = { + aptitude = { court_position = master_of_hunt_court_position value = 2 } + } + add = 6 + } + else_if = { + limit = { + aptitude = { court_position = master_of_hunt_court_position value = 3 } + } + add = 9 + } + else_if = { + limit = { + aptitude = { court_position = master_of_hunt_court_position value = 4 } + } + add = 12 + } + else = { add = 15 } + } + desc = hunt_success_chance.master_of_hunt + } + } + # HUNTSMAN + if = { + limit = { exists = court_position:huntperson_camp_officer } + add = { + value = 0 + court_position:huntperson_camp_officer = { + if = { + limit = { + aptitude = { court_position = huntperson_camp_officer value <= 1 } + } + add = 3 + } + else_if = { + limit = { + aptitude = { court_position = huntperson_camp_officer value = 2 } + } + add = 6 + } + else_if = { + limit = { + aptitude = { court_position = huntperson_camp_officer value = 3 } + } + add = 9 + } + else_if = { + limit = { + aptitude = { court_position = huntperson_camp_officer value = 4 } + } + add = 12 + } + else = { add = 15 } + } + desc = hunt_success_chance.master_of_hunt + } + } + # ESTATE + if = { + limit = { + domicile ?= { has_domicile_parameter = kennels_more_successful_hunts_1 } + } + add = { + value = kennels_more_successful_hunts_1_value + desc = estate_has_kennels + } + } + else_if = { + limit = { + domicile ?= { has_domicile_parameter = kennels_more_successful_hunts_2 } + } + add = { + value = kennels_more_successful_hunts_2_value + desc = estate_has_kennels + } + } + } + # GUESTS + if = { # Hunters + limit = { + any_attending_character = { + NOR = { + this = prev.activity_host + prev.activity_host.court_position:master_of_hunt_court_position ?= this + } + OR = { + has_trait = lifestyle_hunter + has_character_modifier = ep2_beastmaster_modifier + } + } + } + add = { + value = 0 + every_attending_character = { + limit = { + NOR = { + this = prev.activity_host + prev.activity_host.court_position:master_of_hunt_court_position ?= this + } + has_trait = lifestyle_hunter + } + add = 3 + } + every_attending_character = { + limit = { + NOR = { + this = prev.activity_host + prev.activity_host.court_position:master_of_hunt_court_position ?= this + } + has_character_modifier = ep2_beastmaster_modifier + } + add = 3 + } + desc = hunt_success_chance.attending_hunters + } + } + #OPTION + if = { + limit = { + has_activity_option = { category = hunt_option_attendants option = hunt_attendants_normal } + } + add = { + value = 1.25 + multiply = hunt_success_chance_roco_amenity_level_value + desc = hunt_success_chance.hunt_option_attendants + } + } + else_if = { + limit = { + has_activity_option = { category = hunt_option_attendants option = hunt_attendants_many } + } + add = { + value = 2.5 + multiply = hunt_success_chance_roco_amenity_level_value + desc = hunt_success_chance.hunt_option_attendants + } + } + # FORCED ANIMAL + if = { + limit = { exists = var:hunt_forced_type } + add = { + value = 0 + if = { + limit = { var:hunt_forced_type = flag:deer } + add = -10 + } + else_if = { + limit = { var:hunt_forced_type = flag:fox } + add = -5 + } + else_if = { + limit = { var:hunt_forced_type = flag:hare } + add = -10 + } + else_if = { + limit = { var:hunt_forced_type = flag:wolf } + add = -10 + } + desc = hunt_success_chance.forced_type + } + } + # METHOD + if = { # Captive + limit = { exists = var:captive_release } + add = { + value = 15 + desc = hunt_success_chance.captive_release + } + } + # LOCATION + activity_location = { add = hunt_province_reference_value } + # CULTURE + save_temporary_scope_as = activity_temp + add = { + value = 0 + activity_host.culture ?= { + if = { # Forests + limit = { + has_cultural_parameter = forest_hunt_success_chance + scope:activity_temp.activity_location = { + OR = { + terrain = forest + terrain = taiga + } + } + } + add = 5 + } + if = { # Hills + limit = { + has_cultural_parameter = hills_hunt_success_chance + scope:activity_temp.activity_location = { terrain = hills } + } + add = 5 + } + if = { # Deserts + limit = { + has_cultural_parameter = desert_hunt_success_chance + scope:activity_temp.activity_location = { + OR = { + terrain = desert + terrain = oasis + } + } + } + add = 5 + } + if = { # Steppes + limit = { + has_cultural_parameter = steppe_hunt_success_chance + scope:activity_temp.activity_location = { terrain = steppe } + } + add = 5 + } + if = { # Mountains + limit = { + has_cultural_parameter = mountains_hunt_success_chance + scope:activity_temp.activity_location = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + add = 5 + } + if = { # Drylands + limit = { + has_cultural_parameter = drylands_hunt_success_chance + scope:activity_temp.activity_location = { + OR = { + terrain = drylands + terrain = desert + } + } + } + add = 5 + } + if = { # Jungle + limit = { + has_cultural_parameter = jungle_hunt_success_chance + scope:activity_temp.activity_location = { terrain = jungle } + } + add = 5 + } + if = { # Wetlands + limit = { + has_cultural_parameter = wetlands_hunt_success_chance + scope:activity_temp.activity_location = { + OR = { + terrain = wetlands + terrain = floodplains + } + } + } + add = 5 + } + } + desc = hunt_success_chance.culture + } + # SIGHTINGS + if = { + limit = { + OR = { + # Standard + AND = { + OR = { + activity_location.county = { has_county_modifier = hunt_sighting_standard_modifier } + activity_location.county = { has_county_modifier = hunt_sighting_dangerous_modifier } + } + has_activity_option = { category = special_type option = hunt_type_standard } + } + # Falconry + AND = { + activity_location.county = { has_county_modifier = hunt_sighting_falconry_modifier } + has_activity_option = { category = special_type option = hunt_type_falconry } + } + } + # Sighting animal is same as activity animal + exists = var:animal_type + exists = activity_location.county.var:animal_type + var:animal_type = activity_location.county.var:animal_type + } + add = { + value = 20 + desc = hunt_success_chance.sighting + } + } + # MODIFIERS + if = { # Mismanaged Game + limit = { + activity_location.county = { has_county_modifier = hunt_mismanaged_game_modifier } + exists = var:animal_type + activity_host.var:mismanaged_animal_type ?= var:animal_type + } + add = { + value = -5 + desc = hunt_success_chance.hunt_mismanaged_game_modifier + } + } + if = { # Abundant Game + limit = { + activity_location.county = { has_county_modifier = ep3_abundant_game_modifier } + } + add = { + value = 10 + desc = hunt_success_chance.hunt_abundant_game_modifier + } + } + if = { # Wild Predators + limit = { + activity_location.county = { has_county_modifier = ep3_wild_predators_modifier } + } + add = { + value = -5 + desc = hunt_success_chance.hunt_wild_predators_modifier + } + } + # EVENTS + if = { + limit = { exists = var:hunt_success_chance_event } + add = { + value = var:hunt_success_chance_event + desc = hunt_success_chance.events + } + } + # TYPE + if = { # Falconry is somewhat more difficult + limit = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + multiply = 0.75 + } + else_if = { # Legendary is a lot more difficult + limit = { + has_activity_option = { category = special_type option = hunt_type_legendary } + } + multiply = 0.5 + } + if = { + limit = { var:hunt_success ?= flag:no } + multiply = 0 + } + min = 10 + max = 80 +} + +hunt_success_chance_inverse_value = { + value = 100 + subtract = hunt_success_chance_value +} + +hunt_province_reference_value = { + value = 0 + # TERRAIN + add = { + value = 0 + if = { + limit = { + OR = { + terrain = farmlands + terrain = floodplains + } + } + add = -10 + } + else_if = { + limit = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = oasis + } + } + add = -5 + } + else_if = { + limit = { + OR = { + terrain = hills + terrain = wetlands + } + } + add = 5 + } + else_if = { + limit = { + OR = { + terrain = taiga + terrain = forest + terrain = mountains + terrain = jungle + } + } + add = 10 + } + desc = hunt_success_chance.terrain + } + # POPULATION + if = { + limit = { has_holding = no } + add = { + value = 10 + desc = hunt_success_chance.no_holding + } + } + if = { + limit = { county.development_level >= terrible_development_level } + # Example: development = 15 / 3 * -1 = -5 + county ?= { + add = { + value = development_level + divide = 3 + multiply = -1 + desc = hunt_success_chance.development + } + } + } + # BUILDINGS + if = { # Hunting Grounds + limit = { + OR = { + has_building_or_higher = hunting_grounds_01 + has_building_or_higher = rainbow_mountains_01 + } + } + add = hunt_hunting_grounds_success_value + } + if = { # Logging Camps + limit = { has_building_or_higher = logging_camps_01 } + add = hunt_logging_camps_success_value + } + if = { # Royal Reserves + limit = { + county.title_province ?= { has_building_or_higher = royal_forest_01 } + } + county.title_province = { add = hunt_royal_reserves_success_value } + } + # MODIFIERS + if = { + limit = { + county ?= { has_county_modifier = hunt_mismanaged_game_modifier } + } + add = { + value = -5 + desc = hunt_success_chance.hunt_mismanaged_game_modifier + } + } + if = { # Abundant Game + limit = { + county ?= { has_county_modifier = ep3_abundant_game_modifier } + } + add = { + value = 10 + desc = hunt_success_chance.hunt_abundant_game_modifier + } + } + if = { # Wild Predators + limit = { + county ?= { has_county_modifier = ep3_wild_predators_modifier } + } + add = { + value = -5 + desc = hunt_success_chance.hunt_wild_predators_modifier + } + } + if = { + limit = { + county ?= { has_county_modifier = hunt_punished_locals_modifier } + } + add = { + value = 5 + desc = hunt_success_chance.hunt_punished_locals_modifier + } + } + if = { # Inspection Modifiers + limit = { + has_province_modifier = inspection_hidden_hinterlands_recruit_modifier + } + add = { + value = 10 + desc = hunt_success_chance.hidden_hinterlands_recruit_modifier + } + } + if = { # Inspection Modifiers + limit = { + has_province_modifier = inspection_hidden_hinterlands_hunters_modifier + } + add = { + value = 10 + desc = hunt_success_chance.hidden_hinterlands_huntsmen_modifier + } + } + # VARIABLES + if = { + limit = { exists = var:recent_hunt_held } + add = { + value = -10 + multiply = var:recent_hunt_held + desc = hunt_success_chance.recent_hunt_held + } + } +} + +hunt_melee_danger_value = { + value = 25 + scope:activity = { + if = { + limit = { exists = var:animal_type } + if = { + limit = { + OR = { + var:animal_type = flag:lion + var:animal_type = flag:tiger + var:animal_type = flag:leopard + } + } + add = 25 + } + else_if = { + limit = { var:animal_type = flag:bear } + add = 20 + } + else_if = { + limit = { + var:animal_type = flag:boar + var:animal_type = flag:bison + var:animal_type = flag:hart + var:animal_type = flag:reindeer + var:animal_type = flag:elk + } + add = 15 + } + else_if = { + limit = { + OR = { + var:animal_type = flag:wolf + var:animal_type = flag:hyena + var:animal_type = flag:lynx + var:animal_type = flag:stag + var:animal_type = flag:antelope + } + } + add = 10 + } + else_if = { + limit = { + OR = { + var:animal_type = flag:fox + var:animal_type = flag:roe + var:animal_type = flag:gazelle + } + } + add = -10 + } + else_if = { + limit = { var:animal_type = flag:hare } + add = -20 + } + } + # huntsmaster accolade bonuses + if = { + limit = { + scope:host = { + any_active_accolade = { + has_accolade_parameter = acclaimed_knight_reduces_hunting_danger + } + } + } + add = acclaimed_knight_hunt_danger_value + } + else_if = { + limit = { + scope:host = { + any_active_accolade = { + has_accolade_parameter = acclaimed_knight_reduces_hunting_danger_high + } + } + } + add = acclaimed_knight_hunt_danger_value_high + } + } +} + +hunt_bow_danger_value = { + value = hunt_melee_danger_value + multiply = 0.25 + scope:activity = { + # huntsmaster accolade bonuses + if = { + limit = { + scope:host = { + any_active_accolade = { + has_accolade_parameter = acclaimed_knight_reduces_hunting_danger + } + } + } + add = acclaimed_knight_hunt_danger_value + } + else_if = { + limit = { + scope:host = { + any_active_accolade = { + has_accolade_parameter = acclaimed_knight_reduces_hunting_danger_high + } + } + } + add = acclaimed_knight_hunt_danger_value_high + } + } +} + +hunt_melee_kill_prowess_value = { + value = 10 + if = { + limit = { exists = scope:activity.var:animal_type } + if = { + limit = { + OR = { + scope:activity.var:animal_type = flag:lion + scope:activity.var:animal_type = flag:tiger + scope:activity.var:animal_type = flag:leopard + } + } + add = 12 + } + else_if = { + limit = { scope:activity.var:animal_type = flag:bear } + add = 9 + } + else_if = { + limit = { + scope:activity.var:animal_type = flag:boar + scope:activity.var:animal_type = flag:bison + scope:activity.var:animal_type = flag:hart + scope:activity.var:animal_type = flag:reindeer + scope:activity.var:animal_type = flag:elk + } + add = 6 + } + else_if = { + limit = { + OR = { + scope:activity.var:animal_type = flag:wolf + scope:activity.var:animal_type = flag:hyena + scope:activity.var:animal_type = flag:lynx + scope:activity.var:animal_type = flag:stag + scope:activity.var:animal_type = flag:antelope + } + } + add = 3 + } + else_if = { + limit = { + OR = { + scope:activity.var:animal_type = flag:roe + scope:activity.var:animal_type = flag:gazelle + } + } + add = -5 + } + else_if = { + limit = { scope:activity.var:animal_type = flag:hare } + add = -9 + } + } +} + +hunt_prestige_melee_value = { + value = 75 + if = { + limit = { + OR = { + scope:activity.var:animal_type = flag:fox + scope:activity.var:animal_type = flag:hare + } + } + add = -25 + } + else_if = { + limit = { + OR = { + scope:activity.var:animal_type = flag:wolf + scope:activity.var:animal_type = flag:hyena + scope:activity.var:animal_type = flag:lynx + } + } + add = 25 + } + else_if = { + limit = { + OR = { + scope:activity.var:animal_type = flag:boar + scope:activity.var:animal_type = flag:hart + scope:activity.var:animal_type = flag:elk + scope:activity.var:animal_type = flag:bison + scope:activity.var:animal_type = flag:aurochs + } + } + add = 50 + } + else_if = { + limit = { + OR = { + scope:activity.var:animal_type = flag:leopard + scope:activity.var:animal_type = flag:lion + scope:activity.var:animal_type = flag:tiger + scope:activity.var:animal_type = flag:bear + } + } + add = 75 + } + if = { + limit = { exists = scope:activity.var:female_quarry } + divide = 2 + } +} + +hunt_prestige_melee_group_value = { + value = hunt_prestige_melee_value + divide = 3 +} + +hunt_prestige_melee_wound_value = { + value = hunt_prestige_melee_value + multiply = 0.75 +} + +hunt_prestige_melee_wound_group_value = { + value = hunt_prestige_melee_group_value + divide = 2 +} + +hunt_prestige_bow_value = { + value = hunt_prestige_melee_value + divide = 2 +} + +hunt_murder_accomplice_prowess_value = { + value = scope:murderer.prowess + add = { + value = scope:accomplice.prowess + multiply = 0.5 + } +} + +hunt_prestige_animal_level_value = { + value = 2 + if = { + limit = { + OR = { + scope:activity.var:animal_type ?= flag:hare + scope:activity.var:animal_type ?= flag:fox + } + } + subtract = 1 + } + else_if = { + limit = { + OR = { + scope:activity.var:animal_type ?= flag:wolf + scope:activity.var:animal_type ?= flag:hyena + scope:activity.var:animal_type ?= flag:lynx + } + } + add = 1 + } + else_if = { + limit = { + OR = { + scope:activity.var:animal_type ?= flag:boar + scope:activity.var:animal_type ?= flag:hart + scope:activity.var:animal_type ?= flag:elk + scope:activity.var:animal_type ?= flag:bison + scope:activity.var:animal_type ?= flag:aurochs + } + } + add = 2 + } + else_if = { + limit = { + OR = { + scope:activity.var:animal_type ?= flag:bear + scope:activity.var:animal_type ?= flag:lion + scope:activity.var:animal_type ?= flag:tiger + scope:activity.var:animal_type ?= flag:leopard + hunt_activity_exotic_bird_trigger = { VAR = var:animal_type } + } + } + add = 3 + } +} + +hunt_prestige_reward_value = { + # Standard value for most chars. + value = minor_prestige_value + + scope:activity = { + if = { + limit = { + OR = { + var:animal_type ?= flag:hare + var:animal_type ?= flag:fox + } + } + multiply = 2 + } + else_if = { + limit = { + OR = { + var:animal_type ?= flag:boar + var:animal_type ?= flag:hart + var:animal_type ?= flag:elk + var:animal_type ?= flag:bison + var:animal_type ?= flag:aurochs + } + } + multiply = 6 + } + else_if ={ + limit = { + OR = { + var:animal_type ?= flag:bear + var:animal_type ?= flag:lion + var:animal_type ?= flag:tiger + var:animal_type ?= flag:leopard + hunt_activity_exotic_bird_trigger = { VAR = var:animal_type } + } + } + multiply = 8 + } + else = { multiply = 4 } + if = { + limit = { + has_activity_option = { category = hunt_option_party_size option = hunt_party_size_normal } + } + multiply = 1.25 + } + else_if = { + limit = { + has_activity_option = { category = hunt_option_party_size option = hunt_party_size_many } + } + multiply = 1.5 + } + } + if = { + limit = { scope:activity.var:hunt_success ?= flag:no } + divide = 2 + } + if = { + limit = { exists = scope:activity.var:female_quarry } + divide = 2 + } + if = { + limit = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_legendary } + var:hunt_success ?= flag:yes + } + } + multiply = 2 + } + else_if = { + limit = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + } + multiply = 2 + } + if = { + limit = { + scope:activity.activity_host = { + OR = { + has_character_modifier = employer_booner_master_of_hunt_2_modifier + has_character_modifier = employer_booner_master_of_hunt_3_modifier + } + } + } + multiply = 1.2 + } + + if = { + limit = { + scope:activity.activity_host = { + is_landless_adventurer = yes + } + } + multiply = 0.25 + } +} + +hunt_provisions_reward_value = { + value = 50 + + scope:activity = { + if = { + limit = { + OR = { + var:animal_type ?= flag:hare + var:animal_type ?= flag:fox + } + } + multiply = 2 + } + else_if = { + limit = { + OR = { + var:animal_type ?= flag:hart + var:animal_type ?= flag:roe + var:animal_type ?= flag:antelope + var:animal_type ?= flag:gazelle + var:animal_type ?= flag:saiga + } + } + multiply = 6 + } + else_if = { + limit = { + OR = { + var:animal_type ?= flag:stag + var:animal_type ?= flag:reindeer + var:animal_type ?= flag:lion + var:animal_type ?= flag:tiger + } + } + multiply = 8 + } + else_if ={ + limit = { + OR = { + var:animal_type ?= flag:bear + var:animal_type ?= flag:boar + var:animal_type ?= flag:elk + } + } + multiply = 12 + } + else_if ={ + limit = { + OR = { + var:animal_type ?= flag:bison + var:animal_type ?= flag:aurochs + } + } + multiply = 16 + } + # Not that much meat on these, so they get a low modifier + #var:animal_type ?= flag:wolf + #var:animal_type ?= flag:hyena + #var:animal_type ?= flag:leopard + #var:animal_type ?= flag:lynx + else = { multiply = 4 } + } + if = { + limit = { scope:activity.var:hunt_success ?= flag:no } + divide = 2 + } + if = { + limit = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_legendary } + var:hunt_success ?= flag:yes + } + } + multiply = 2 + } + else_if = { + limit = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + } + multiply = 0.25 + } +} + +hunt_prestige_with_piety_reward_value = { + value = hunt_prestige_reward_value + divide = 2 +} + +hunt_piety_reward_value = { + value = hunt_prestige_reward_value + divide = 2 +} + +hunt_glory_hound_vassal_opinion_value = { + value = 5 + add = { + value = 5 + multiply = hunt_prestige_animal_level_value + } +} + +# PARTY SIZE + +# These should ALWAYS be synced with the relevant activity option select_travel_entourage_max parameter. +hunt_entourage_party_size_small_max_value = 5 +hunt_entourage_party_size_normal_max_value = 10 +hunt_entourage_party_size_many_max_value = 15 + +hunt_entourage_base_set_weighting_value = { + if = { + limit = { + is_available_healthy_adult = yes + bannable_serving_diarch_trigger = no + OR = { + has_court_position = master_of_hunt_court_position + has_court_position = huntperson_camp_officer + has_court_position = bodyguard_court_position + has_court_position = akolouthos_court_position + has_court_position = court_physician_court_position + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = lifestyle_hunter + } + NAND = { + scope:special_option ?= flag:hunt_type_falconry + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + # Base + add = 50 + add = ai_energy + add = ai_boldness + # We want to have MoH most of all. + if = { + limit = { has_court_position = master_of_hunt_court_position } + add = 100000 + } + if = { + limit = { has_court_position = huntperson_camp_officer } + add = 100000 + } + # We want bodyguards too. + if = { + limit = { has_court_position = bodyguard_court_position } + add = 50000 + } + # And EP3 akolouthos + if = { + limit = { has_court_position = akolouthos_court_position } + add = 50000 + } + # We want doctors too. + if = { + limit = { has_court_position = court_physician_court_position } + add = 50000 + } + # Adventurers bring their court. + if = { + limit = { + scope:host = { is_landless_adventurer = yes } + } + add = 500 + } + # We want friends too. + if = { + limit = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + } + add = 500 + } + # Sex + if = { + limit = { + exists = scope:special_option + NOT = { scope:special_option = flag:hunt_type_falconry } + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + divide = 2 + } + } + if = { + limit = { + bannable_serving_diarch_trigger = yes + } + add = -1000 + } +} + +hunt_entourage_extras_set_weighting_value = { + value = 0 + if = { + limit = { + is_available_healthy_adult = yes + is_designated_diarch = no + OR = { + is_knight_of = scope:host + has_trait = education_martial + has_trait = education_martial_prowess + has_trait = lazy + prowess >= decent_skill_rating + } + trigger_if = { + limit = { + NOT = { scope:special_option ?= flag:hunt_type_falconry } + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + trigger_else = { always = yes } + } + # Base + add = 150 + } +} + +hunt_entourage_sodding_everyone_set_weighting_value = { + value = 0 + if = { + limit = { + is_available_healthy_adult = yes + is_designated_diarch = no + } + # Base + add = 50 + # Alright, now we're just grabbing everyone. + ## Anyone who can fight. + if = { + limit = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + multiply = 1.5 + } + } +} diff --git a/common/script_values/04_ep2_tournament_values.txt b/common/script_values/04_ep2_tournament_values.txt new file mode 100644 index 00000000..f8940f80 --- /dev/null +++ b/common/script_values/04_ep2_tournament_values.txt @@ -0,0 +1,2521 @@ +###################### +# TOURNAMENT STUFF +###################### + +# Contest Aptitude Values + +contest_aptitude_fetch_value = { + value = 0 + if = { + limit = { exists = var:contest_aptitude } + add = var:contest_aptitude + } + min = 1 +} + +contest_aptitude_fetch_half_value = { + value = contest_aptitude_fetch_value + divide = 2 + min = 1 +} + +progress_to_victory_fetch_value = { + value = 0 + if = { + limit = { exists = var:contest_aptitude } + add = var:contest_aptitude + } + min = 1 +} + +progress_to_victory_fetch_half_value = { + value = progress_to_victory_fetch_value + divide = 2 + min = 1 +} + +progress_to_victory_fetch_team_a_half_value = { + value = var:team_a_ptv + divide = 2 + min = 1 +} + +progress_to_victory_fetch_team_b_half_value = { + value = var:team_b_ptv + divide = 2 + min = 1 +} + +progress_to_victory_total_ffa_current_active_phase = { + value = 0 + involved_activity = { + every_guest_subset_current_phase = { + name = qualified + limit = { exists = var:progress_to_victory } + add = var:progress_to_victory + } + } + min = 1 +} + +progress_to_victory_own_team_ptv_value = { + value = 0 + if = { + limit = { + is_in_guest_subset = { name = team_alpha } + } + add = involved_activity.var:team_a_ptv + } + else_if = { + limit = { + is_in_guest_subset = { name = team_beta } + } + add = involved_activity.var:team_b_ptv + } +} + +progress_to_victory_other_team_ptv_value = { + value = 0 + if = { + limit = { + is_in_guest_subset = { name = team_alpha } + } + add = involved_activity.var:team_b_ptv + } + else_if = { + limit = { + is_in_guest_subset = { name = team_beta } + } + add = involved_activity.var:team_a_ptv + } +} + +progress_to_victory_total_team_current_active_phase = { + value = 0 + if = { + limit = { + exists = involved_activity.var:team_a_ptv + exists = involved_activity.var:team_b_ptv + } + add = involved_activity.var:team_a_ptv + add = involved_activity.var:team_b_ptv + } + min = 1 +} + +progress_to_victory_versus_match_value = { + if = { + limit = { + involved_activity = { has_current_phase = tournament_phase_joust } + } + # Compare with correct rounds match + if = { + limit = { involved_activity.var:contest_versus_progress ?= 2 } + if = { + limit = { is_in_guest_subset = { name = winner } } + add = -100 + } + else_if = { + limit = { exists = var:contest_finalist_match_joust.var:progress_to_victory } + add = var:contest_finalist_match_joust.var:progress_to_victory + } + } + else_if = { + limit = { involved_activity.var:contest_versus_progress ?= 1 } + if = { + limit = { is_in_guest_subset = { name = finalist } } + add = -100 + } + else_if = { + limit = { exists = var:contest_semi_finalist_match_joust.var:progress_to_victory } + add = var:contest_semi_finalist_match_joust.var:progress_to_victory + } + } + else_if = { + limit = { involved_activity.var:contest_versus_progress ?= 0 } + if = { + limit = { is_in_guest_subset = { name = semi_finalist } } + add = -100 + } + else_if = { + limit = { exists = var:contest_qualified_match_joust.var:progress_to_victory } + add = var:contest_qualified_match_joust.var:progress_to_victory + } + } + # Use own to make it 50% for UI as a fallback + else = { add = var:progress_to_victory } + } + if = { + limit = { + involved_activity = { has_current_phase = tournament_phase_duel } + } + # Compare with correct rounds match + if = { + limit = { involved_activity.var:contest_versus_progress ?= 2 } + if = { + limit = { is_in_guest_subset = { name = winner } } + add = -100 + } + else_if = { + limit = { exists = var:contest_finalist_match_duel.var:progress_to_victory } + add = var:contest_finalist_match_duel.var:progress_to_victory + } + } + else_if = { + limit = { involved_activity.var:contest_versus_progress ?= 1 } + if = { + limit = { is_in_guest_subset = { name = finalist } } + add = -100 + } + else_if = { + limit = { exists = var:contest_semi_finalist_match_duel.var:progress_to_victory } + add = var:contest_semi_finalist_match_duel.var:progress_to_victory + } + } + else_if = { + limit = { involved_activity.var:contest_versus_progress ?= 0 } + if = { + limit = { is_in_guest_subset = { name = semi_finalist } } + add = -100 + } + else_if = { + limit = { exists = var:contest_qualified_match_duel.var:progress_to_victory } + add = var:contest_qualified_match_duel.var:progress_to_victory + } + } + # Use own to make it 50% for UI as a fallback + else = { add = var:progress_to_victory } + } + if = { + limit = { + involved_activity = { has_current_phase = tournament_phase_wrestling } + } + # Compare with correct rounds match + if = { + limit = { involved_activity.var:contest_versus_progress ?= 2 } + if = { + limit = { is_in_guest_subset = { name = winner } } + add = -100 + } + else_if = { + limit = { exists = var:contest_finalist_match_wrestling.var:progress_to_victory } + add = var:contest_finalist_match_wrestling.var:progress_to_victory + } + } + else_if = { + limit = { involved_activity.var:contest_versus_progress ?= 1 } + if = { + limit = { is_in_guest_subset = { name = finalist } } + add = -100 + } + else_if = { + limit = { exists = var:contest_semi_finalist_match_wrestling.var:progress_to_victory } + add = var:contest_semi_finalist_match_wrestling.var:progress_to_victory + } + } + else_if = { + limit = { involved_activity.var:contest_versus_progress ?= 0 } + if = { + limit = { is_in_guest_subset = { name = semi_finalist } } + add = -100 + } + else_if = { + limit = { exists = var:contest_qualified_match_wrestling.var:progress_to_victory } + add = var:contest_qualified_match_wrestling.var:progress_to_victory + } + } + # Use own to make it 50% for UI as a fallback + else = { add = var:progress_to_victory } + } + if = { + limit = { + involved_activity = { has_current_phase = tournament_phase_board_game } + } + # Compare with correct rounds match + if = { + limit = { involved_activity.var:contest_versus_progress ?= 2 } + if = { + limit = { is_in_guest_subset = { name = winner } } + add = -100 + } + else_if = { + limit = { exists = var:contest_finalist_match_board_game.var:progress_to_victory } + add = var:contest_finalist_match_board_game.var:progress_to_victory + } + } + else_if = { + limit = { involved_activity.var:contest_versus_progress ?= 1 } + if = { + limit = { is_in_guest_subset = { name = finalist } } + add = -100 + } + else_if = { + limit = { exists = var:contest_semi_finalist_match_board_game.var:progress_to_victory } + add = var:contest_semi_finalist_match_board_game.var:progress_to_victory + } + } + else_if = { + limit = { involved_activity.var:contest_versus_progress ?= 0 } + if = { + limit = { is_in_guest_subset = { name = semi_finalist } } + add = -100 + } + else_if = { + limit = { exists = var:contest_qualified_match_board_game.var:progress_to_victory } + add = var:contest_qualified_match_board_game.var:progress_to_victory + } + } + # Use own to make it 50% for UI as a fallback + else = { add = var:progress_to_victory } + } + min = 0 +} + +## Referenced to in the UI +# Returns the scoped character's chance of winning any contest based on the +# their PTV against the opposing PTV. +# +# Calculate as: +# team: team_ptv / ( team_ptv + opposing_team_ptv ) +# ffa: root.var:ptv / ( sum( scope:all_qualified.var:ptv ) ) +# 1v1: root.var:ptv / ( root.var:ptv + scope:opponent.var:ptv ) +character_chance_of_victory = { + value = 0 + if = { + limit = { + is_in_guest_subset = { name = qualified } + exists = var:progress_to_victory + } + # TEAM + if = { + limit = { + involved_activity = { has_current_phase = tournament_phase_melee } + } + # Fetch own team's PtV + add = progress_to_victory_own_team_ptv_value + # Divide by both team's PtV + divide = progress_to_victory_total_team_current_active_phase + } + # TURN/RACE + else_if = { + limit = { + involved_activity = { + OR = { + has_current_phase = tournament_phase_archery + has_current_phase = tournament_phase_recital + has_current_phase = tournament_phase_horse_race + } + } + } + # Fetch own PtV + add = var:progress_to_victory + # Divide by combined contestant's PtV + divide = progress_to_victory_total_ffa_current_active_phase + } + # VERSUS + else_if = { + limit = { exists = var:progress_to_victory } + # Fetch own PtV + add = var:progress_to_victory + # Divide by own + matches PtV + divide = { + value = var:progress_to_victory + add = progress_to_victory_versus_match_value + } + } + } +} + +## Referenced in the Debug UI +# Returns the PTV of the scoped character's opponent in any situation. +# This is the pure PTV for the opponents, no their chance of victory. +# +# Return as: +# team: opposing_team_ptv +# ffa: sum( scope:all_qualified.var:ptv ) - root.var:ptv +# 1v1: scope:opponent.var:ptv + +debug_opposing_progress_to_victory = { + value = 0 + if = { + limit = { + is_in_guest_subset = { name = qualified } + } + # TEAM + if = { + limit = { + involved_activity = { has_current_phase = tournament_phase_melee } + } + # Fetch other team's PtV + add = progress_to_victory_other_team_ptv_value + } + # TURN/RACE + else_if = { + limit = { + exists = var:progress_to_victory + involved_activity = { + OR = { + has_current_phase = tournament_phase_archery + has_current_phase = tournament_phase_recital + has_current_phase = tournament_phase_horse_race + } + } + } + # Fetch combined contestant's PtV, except yours + add = progress_to_victory_total_ffa_current_active_phase + subtract = var:progress_to_victory + } + # VERSUS + # Fetch matched contestant's PtV + else = { add = progress_to_victory_versus_match_value } + } + min = 1 +} + +count_remaining_contestants = { + value = 0 + involved_activity = { + every_guest_subset_current_phase = { + name = qualified + limit = { + AND = { + exists = var:progress_to_victory + var:progress_to_victory > 0 + } + } + add = 1 + } + } +} + +# The end result of this number MUST be between 0 and 5, otherwise the game +# will crash due to being used in the UI to allocate a segmented progress bar +contest_type_aptitude_wit = { + value = 0 + # Score + if = { + limit = { + involved_activity ?= { + OR = { + has_current_phase = tournament_phase_board_game + has_current_phase = tournament_phase_recital + } + } + exists = var:progress_to_victory_score + var:progress_to_victory_score >= contest_progress_increase_medium_value + } + add = { + value = 1 + if = { + limit = { var:progress_to_victory_score >= contest_progress_increase_massive_value } + add = 1 + } + desc = tournament_aptitude.events + } + } + # Trait + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + add = { + value = 1 + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 50 + } + } + add = 1 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 75 + } + } + add = 1 + } + desc = tourney_participant_wit + } + } + #Primary skill without Hastiludes + if = { # Diplomacy + limit = { + NOT = { + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + diplomacy >= medium_skill_rating + } + add = { + value = 1 + if = { + limit = { diplomacy >= high_skill_rating } + add = 1 + } + desc = diplomacy_concept + } + } + if = { # Learning + limit = { + NOT = { + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + learning >= medium_skill_rating + } + add = { + value = 1 + if = { + limit = { learning >= high_skill_rating } + add = 1 + } + desc = learning_concept + } + } + # Lifestyle & Genetic + if = { + limit = { + involved_activity ?= { has_current_phase = tournament_phase_recital } + has_trait = poet + } + add = { + value = 1 + desc = trait_poet + } + } + if = { + limit = { + OR = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + has_trait = shrewd + } + } + add = { + value = 1 + desc = trait_shrewd + } + } + # Disability & Misc. + if = { + limit = { + involved_activity ?= { has_current_phase = tournament_phase_recital } + has_trait = lisping + } + add = { + value = -1 + desc = trait_lisping + } + } + if = { + limit = { + involved_activity ?= { has_current_phase = tournament_phase_recital } + has_trait = stuttering + } + add = { + value = -1 + desc = trait_stuttering + } + } + if = { + limit = { has_trait = dull } + add = { + value = -1 + desc = trait_dull + } + } + + max = 5 +} + +# The end result of this number MUST be between 0 and 5, otherwise the game +# will crash due to being used in the UI to allocate a segmented progress bar +contest_type_aptitude_foot = { + value = 0 + # Score + if = { + limit = { + involved_activity ?= { + OR = { + has_current_phase = tournament_phase_duel + has_current_phase = tournament_phase_wrestling + } + } + exists = var:progress_to_victory_score + var:progress_to_victory_score >= contest_progress_increase_medium_value + } + add = { + value = 1 + if = { + limit = { var:progress_to_victory_score >= contest_progress_increase_massive_value } + add = 1 + } + desc = tournament_aptitude.events + } + } + else_if = { + limit = { + involved_activity ?= { has_current_phase = tournament_phase_melee } + exists = var:progress_to_victory_score + var:progress_to_victory_score >= contest_progress_increase_medium_value + } + add = { + value = 0.5 + if = { + limit = { var:progress_to_victory_score >= contest_progress_increase_massive_value } + add = 0.5 + } + desc = tournament_aptitude.events + } + } + # Trait + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 25 + } + } + add = { + value = 1 + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + add = 1 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + } + add = 1 + } + desc = tourney_participant_foot + } + } + #Primary skill without Hastiludes + if = { # Prowess + limit = { + NOT = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 25 + } + } + prowess >= medium_skill_rating + } + add = { + value = 1 + if = { + limit = { prowess >= high_skill_rating } + add = 1 + } + desc = prowess_concept + } + } + if = { # Martial + limit = { + NOT = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 25 + } + } + martial >= medium_skill_rating + } + add = { + value = 1 + if = { + limit = { martial >= high_skill_rating } + add = 1 + } + desc = martial_concept + } + } + # Lifestyle & Genetic + if = { + limit = { has_trait = lifestyle_blademaster } + add = { + value = 1 + desc = trait_lifestyle_blademaster + } + } + if = { + limit = { + OR = { + has_trait = physique_good_1 + has_trait = physique_good_2 + has_trait = physique_good_3 + has_trait = strong + } + } + add = { + value = 1 + desc = trait_strong + } + } + + # Disability & Misc. + if = { + limit = { has_trait = weak } + add = { + value = -1 + desc = trait_weak + } + } + if = { + limit = { has_trait = maimed } + add = { + value = -1 + desc = trait_maimed + } + } + if = { + limit = { has_trait = giant } + add = { + value = 1 + desc = trait_giant + } + } + if = { + limit = { + has_trait = viking + culture ?= { has_innovation = innovation_longboats } + } + add = { + value = 1 + desc = trait_viking_has_longships + } + } + if = { + limit = { + has_trait = viking + exists = culture + NOT = { + culture = { has_innovation = innovation_longboats } + } + } + add = { + value = 1 + desc = trait_viking_fallback + } + } + if = { + limit = { has_trait = faith_warrior } + add = { + value = 1 + desc = trait_faith_warrior + } + } + if = { + limit = { has_trait = berserker } + add = { + value = 1 + desc = trait_berserker + } + } + + max = 5 + min = 0 +} + +# The end result of this number MUST be between 0 and 5, otherwise the game +# will crash due to being used in the UI to allocate a segmented progress bar +contest_type_aptitude_horse = { + value = 0 + # Score + if = { + limit = { + involved_activity ?= { + OR = { + has_current_phase = tournament_phase_horse_race + has_current_phase = tournament_phase_joust + } + } + exists = var:progress_to_victory_score + var:progress_to_victory_score >= contest_progress_increase_medium_value + } + add = { + value = 1 + if = { + limit = { var:progress_to_victory_score >= contest_progress_increase_massive_value } + add = 1 + } + desc = tournament_aptitude.events + } + } + else_if = { + limit = { + involved_activity ?= { has_current_phase = tournament_phase_melee } + exists = var:progress_to_victory_score + var:progress_to_victory_score >= contest_progress_increase_medium_value + } + add = { + value = 0.5 + if = { + limit = { var:progress_to_victory_score >= contest_progress_increase_massive_value } + add = 0.5 + } + desc = tournament_aptitude.events + } + } + # Trait + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 25 + } + } + add = { + value = 1 + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + add = 1 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 75 + } + } + add = 1 + } + desc = tourney_participant_foot + } + } + if = { # Prowess + limit = { + NOT = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 25 + } + } + prowess >= medium_skill_rating + } + add = { + value = 1 + if = { + limit = { prowess >= high_skill_rating } + add = 1 + } + desc = prowess_concept + } + } + if = { # Martial + limit = { + NOT = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 25 + } + } + martial >= medium_skill_rating + } + add = { + value = 1 + if = { + limit = { martial >= high_skill_rating } + add = 1 + } + desc = martial_concept + } + } + # Lifestyle & Genetic + if = { + limit = { has_trait = adventurer } #Bit of a stretch, I know + add = { + value = 1 + desc = trait_adventurer + } + } + if = { + limit = { + OR = { + has_trait = education_martial_prowess_1 + has_trait = education_martial_prowess_2 + has_trait = education_martial_prowess_3 + has_trait = education_martial_prowess_4 + } + } + add = { + value = 1 + if = { + limit = { has_trait = education_martial_prowess_2 } + add = 1 + } + else_if = { + limit = { has_trait = education_martial_prowess_3 } + add = 1 + } + else_if = { + limit = { has_trait = education_martial_prowess_4 } + add = 1 + } + desc = trait_education_martial_prowess + } + } + # Disability & Misc. + if = { + limit = { has_trait = dwarf } + add = { + value = 1 + desc = trait_dwarf + } + } + if = { + limit = { has_trait = giant } + add = { + value = -1 + desc = trait_giant + } + } + + max = 5 + min = 0 +} + +# The end result of this number MUST be between 0 and 5, otherwise the game +# will crash due to being used in the UI to allocate a segmented progress bar +contest_type_aptitude_archery = { + value = 0 + # Score + if = { + limit = { + involved_activity ?= { has_current_phase = tournament_phase_archery } + exists = var:progress_to_victory_score + var:progress_to_victory_score >= contest_progress_increase_medium_value + } + add = { + value = 1 + if = { + limit = { var:progress_to_victory_score >= contest_progress_increase_massive_value } + add = 1 + } + desc = tournament_aptitude.events + } + } + # Trait + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 25 + } + } + add = { + value = 1 + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 50 + } + } + add = 1 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 75 + } + } + add = 1 + } + desc = tourney_participant_bow + } + } + # Trait + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 25 + } + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 25 + } + has_trait_xp = { + trait = tourney_participant + track = bow + value < 50 + } + } + add = { + value = 1 + desc = tourney_participant_foot + } + } + else_if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = bow + value < 75 + } + } + add = { + value = 2 + desc = tourney_participant_bow + } + } + else = { + add = { + value = 3 + desc = tourney_participant_bow + } + } + } + #Primary skill without Hastiludes + if = { # Prowess + limit = { + NOT = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 25 + } + } + prowess >= medium_skill_rating + } + add = { + value = 1 + if = { + limit = { prowess >= high_skill_rating } + add = 1 + } + desc = prowess_concept + } + } + # Lifestyle & Genetic + if = { + limit = { + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value >= 25 + } + } + add = { + value = 1 + desc = trait_lifestyle_hunter + } + } + + # Disability & Misc. + if = { + limit = { has_trait = strong } + add = { + value = 1 + desc = trait_strong + } + } + if = { + limit = { has_trait = weak } + add = { + value = -1 + desc = trait_weak + } + } + if = { + limit = { has_trait = one_eyed } + add = { + value = -1 + desc = trait_one_eyed + } + } + if = { + limit = { has_trait = maimed } + add = { + value = -5 + desc = trait_maimed + } + } + + max = 5 + min = 0 +} + +contest_health_aptitude_offset_value = { + # Health + if = { + limit = { health >= excellent_health } + add = 5 + } + else_if = { + limit = { + health >= good_health + health < excellent_health + } + add = 3 + } + else_if = { + limit = { + health < fine_health + health > poor_health + } + add = -5 + } + else_if = { + limit = { + health <= poor_health + health > dying_health + } + add = -10 + } + else_if = { + limit = { health <= dying_health } + add = -20 + } +} + +contest_foot_aptitude_value = { + + ### Base ### + # Prowess + value = contest_base_aptitude_value + add = { + value = prowess_no_portrait # exclude artifacts + multiply = 1.5 + } + + ### Additional Modifiers ### + # Artifacts - only own armor is used + if = { + limit = { + any_character_artifact = { + artifact_slot_type = armor + rarity = illustrious + } + } + add = 20 + } + else_if = { + limit = { + any_character_artifact = { + artifact_slot_type = armor + rarity = famed + } + } + add = 15 + } + else_if = { + limit = { + any_character_artifact = { + artifact_slot_type = armor + rarity = masterwork + } + } + add = 10 + } + else_if = { + limit = { + any_character_artifact = { + artifact_slot_type = armor + rarity = common + } + } + add = 5 + } + # Tourney Trait - Foot + if = { + limit = { has_trait = tourney_participant } + add = 5 + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 20 + } + } + add = 10 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + add = 20 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 80 + } + } + add = 20 + } + } + # Strength + if = { + limit = { has_trait = giant } + add = 4 + } + if = { + limit = { has_trait = strong } + add = 4 + } + if = { + limit = { has_trait = viking } + add = 2 + } + if = { + limit = { has_trait = faith_warrior } + add = 2 + } + if = { + limit = { has_trait = berserker } + add = 4 + } + if = { + limit = { has_trait = physique_good } + if = { + limit = { has_trait = physique_good_1 } + add = 3 + } + else_if = { + limit = { has_trait = physique_good_2 } + add = 6 + } + else_if = { + limit = { has_trait = physique_good_3 } + add = 9 + } + } + # Lifestyle + if = { + limit = { has_trait = lifestyle_blademaster } + add = 4 + if = { + limit = { + has_trait_xp = { + trait = lifestyle_blademaster + value >= 50 + } + } + add = 8 + } + if = { + limit = { + has_trait_xp = { + trait = lifestyle_blademaster + value >= 100 + } + } + add = 12 + } + } + # Health + add = contest_health_aptitude_offset_value + # Favors + every_character_artifact = { + limit = { artifact_type = tournament_favor } + add = 5 + } + # Modifiers + add = shared_tournament_aptitude_modifiers_value + # Other + if = { + limit = { has_character_modifier = tournament_armorer_tournament_modifier } + add = 10 + } + + ### Boundaries ### + min = 1 +} + +contest_melee_aptitude_value = { + + value = contest_foot_aptitude_value + add = contest_horse_aptitude_value + divide = 2 + + ### Boundaries ### + min = 1 +} + +contest_archery_aptitude_value = { + + ### Base ### + # Prowess + value = contest_base_aptitude_value + add = { + value = prowess_no_portrait # exclude artifacts + multiply = 1.5 + } + + ### Additional Modifiers ### + # Artifacts - only own bows are used + if = { + limit = { + any_character_artifact = { + artifact_slot_type = primary_armament + OR = { + artifact_type = longbow + artifact_type = composite + artifact_type = bow + } + rarity = illustrious + } + } + add = 20 + } + else_if = { + limit = { + any_character_artifact = { + artifact_slot_type = primary_armament + OR = { + artifact_type = longbow + artifact_type = composite + artifact_type = bow + } + rarity = famed + } + } + add = 15 + } + else_if = { + limit = { + any_character_artifact = { + artifact_slot_type = primary_armament + OR = { + artifact_type = longbow + artifact_type = composite + artifact_type = bow + } + rarity = masterwork + } + } + add = 10 + } + else_if = { + limit = { + any_character_artifact = { + artifact_slot_type = primary_armament + OR = { + artifact_type = longbow + artifact_type = composite + artifact_type = bow + } + rarity = common + } + } + add = 5 + } + # Tourney Trait - Bow + if = { + limit = { has_trait = tourney_participant } + add = 5 + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 20 + } + } + add = 10 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 50 + } + } + add = 15 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 80 + } + } + add = 20 + } + } + # Strength + if = { + limit = { has_trait = strong } + add = 5 + } + if = { + limit = { has_trait = physique_good } + if = { + limit = { has_trait = physique_good_1 } + add = 4 + } + else_if = { + limit = { has_trait = physique_good_2 } + add = 6 + } + else_if = { + limit = { has_trait = physique_good_3 } + add = 9 + } + } + # Lifestyle + if = { + limit = { has_trait = tourney_participant } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 25 + } + } + add = 7 + } + else_if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 50 + } + } + add = 14 + } + else_if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 75 + } + } + add = 21 + } + } + # Personality + if = { + limit = { has_trait = patient } + add = 3 + } + # Health + add = contest_health_aptitude_offset_value + # Modifiers + add = shared_tournament_aptitude_modifiers_value + ### Boundaries ### + min = 1 +} + +contest_pugilism_aptitude_value = { + + ### Base ### + # Prowess + value = contest_base_aptitude_value + add = { + value = prowess_no_portrait # exclude artifacts + multiply = 1.5 + } + + ### Additional Modifiers ### + # Tourney Trait - Foot + if = { + limit = { has_trait = tourney_participant } + add = 5 + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 20 + } + } + add = 10 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + add = 15 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 80 + } + } + add = 20 + } + } + # Strength + if = { + limit = { has_trait = giant } + add = 10 + } + if = { + limit = { has_trait = strong } + add = 5 + } + if = { + limit = { has_trait = physique_good } + if = { + limit = { has_trait = physique_good_1 } + add = 3 + } + else_if = { + limit = { has_trait = physique_good_2 } + add = 6 + } + else_if = { + limit = { has_trait = physique_good_3 } + add = 9 + } + } + # Personality + if = { + limit = { has_trait = wrathful } + add = 3 + } + if = { + limit = { has_trait = deceitful } + add = 3 + } + if = { + limit = { has_trait = patient } + add = 3 + } + # Health + add = contest_health_aptitude_offset_value + # Modifiers + add = shared_tournament_aptitude_modifiers_value + ### Boundaries ### + min = 1 +} + +contest_horse_aptitude_value = { + + ### Base ### + # Prowess + value = contest_base_aptitude_value + add = { + value = prowess_no_portrait # exclude artifacts + multiply = 0.5 + } + + ### Additional Modifiers ### + # Artifacts - only own armor is used + if = { + limit = { + any_character_artifact = { + artifact_slot_type = armor + rarity = illustrious + } + } + add = 20 + } + else_if = { + limit = { + any_character_artifact = { + artifact_slot_type = armor + rarity = famed + } + } + add = 15 + } + else_if = { + limit = { + any_character_artifact = { + artifact_slot_type = armor + rarity = masterwork + } + } + add = 10 + } + else_if = { + limit = { + any_character_artifact = { + artifact_slot_type = armor + rarity = common + } + } + add = 5 + } + # Tourney Trait - Horse + if = { + limit = { has_trait = tourney_participant } + add = 5 + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 20 + } + } + add = 10 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + add = 15 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 80 + } + } + add = 20 + } + } + # Education + if = { + limit = { has_trait = education_martial_prowess } + if = { + limit = { has_trait = education_martial_prowess_1 } + add = 3 + } + else_if = { + limit = { has_trait = education_martial_prowess_2 } + add = 6 + } + else_if = { + limit = { has_trait = education_martial_prowess_3 } + add = 9 + } + else = { add = 12 } + } + # Content + if = { + limit = { has_character_modifier = improved_horse_mastery_modifier } + add = 5 + } + if = { + limit = { has_character_modifier = cavalry_charge_exercise_modifier } + add = 5 + } + if = { + limit = { has_character_modifier = mounted_warrior_practice_modifier } + add = 5 + } + if = { + limit = { has_character_modifier = tournament_farrier_mistake_modifier } + add = farrier_mistake_value + } + + # Personality + if = { + limit = { has_trait = calm } + add = 3 + } + if = { + limit = { has_trait = compassionate } + add = 3 + } + if = { + limit = { has_trait = patient } + add = 3 + } + # Health + add = contest_health_aptitude_offset_value + + # Modifiers + add = shared_tournament_aptitude_modifiers_value + + ### Boundaries ### + min = 1 +} + +contest_recital_aptitude_value = { + + ### Base ### + # Prowess + value = contest_base_aptitude_value + add = { + value = diplomacy + } + + ### Additional Modifiers ### + # Tourney Trait - Wit + if = { + limit = { has_trait = tourney_participant } + add = 5 + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 20 + } + } + add = 10 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 50 + } + } + add = 15 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 80 + } + } + add = 20 + } + } + # Lifestyle + if = { + limit = { has_trait = poet } + add = 20 + } + # Disability + if = { + limit = { has_trait = lisping } + add = -10 + } + if = { + limit = { has_trait = stuttering } + add = -10 + } + + # Modifiers + add = shared_tournament_aptitude_modifiers_value + + ### Boundaries ### + min = 1 +} + +contest_board_game_aptitude_value = { + + ### Base ### + # Prowess + value = contest_base_aptitude_value + add = { + value = learning + multiply = 1.5 + } + + ### Additional Modifiers ### + # Tourney Trait - Wit + if = { + limit = { has_trait = tourney_participant } + add = 5 + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 20 + } + } + add = 10 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 50 + } + } + add = 15 + } + if = { + limit = { + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 80 + } + } + add = 20 + } + } + + # Modifiers + add = shared_tournament_aptitude_modifiers_value + + ### Boundaries ### + min = 1 +} + +contest_horse_race_aptitude_value = { + + ### Base ### + # Prowess + value = 0 + add = primary_title.tier + multiply = contest_base_aptitude_value + + ### Additional Modifiers ### + # Education + if = { + limit = { has_trait = education_stewardship } + if = { + limit = { has_trait = education_stewardship_1 } + add = 2 + } + else_if = { + limit = { has_trait = education_stewardship_2 } + add = 5 + } + else_if = { + limit = { has_trait = education_stewardship_3 } + add = 8 + } + else = { add = 10 } + } + if = { + limit = { has_character_flag = contest_horse_race_war_horse } + if = { + limit = { has_character_modifier = horse_agility_agility_modifier } + add = 20 + } + else_if ={ + limit = { has_character_modifier = horse_endurance_agility_modifier } + add = 15 + } + else_if ={ + limit = { has_character_modifier = horse_endurance_endurance_modifier } + add = 10 + } + else_if ={ + limit = { + OR = { + has_character_modifier = horse_agility_modifier + has_character_modifier = horse_endurance_modifier + has_character_modifier = horse_agility_strength_modifier + has_character_modifier = horse_fierceness_agility_modifier + has_character_modifier = horse_fierceness_endurance_modifier + has_character_modifier = horse_endurance_strength_modifier + } + } + add = 5 + } + } + # Personality + if = { + limit = { has_trait = diligent } + add = 3 + } + if = { + limit = { has_trait = overseer } + add = 3 + } + if = { + limit = { has_trait = administrator } + add = 3 + } + # Flavor + if = { + limit = { + exists = var:contest_horse_race_name + var:contest_horse_race_name = flag:seianian + } + multiply = 0.25 + } + # Flavor + if = { + limit = { + exists = var:horse_race_jockey + var:horse_race_jockey = { is_alive = yes } + } + add = var:horse_race_jockey.contest_horse_aptitude_value + } + ### Boundaries ### + min = 1 +} + +contest_current_contest_aptitude_value = { + + value = 0 + if = { + limit = { scope:activity = { has_current_phase = tournament_phase_joust } } + add = contest_horse_aptitude_value + } + else_if = { + limit = { + scope:activity = { + OR = { + has_current_phase = tournament_phase_duel + has_current_phase = tournament_phase_melee + } + } + } + add = contest_foot_aptitude_value + } + else_if = { + limit = { scope:activity = { has_current_phase = tournament_phase_board_game } } + add = contest_board_game_aptitude_value + } + else_if = { + limit = { scope:activity = { has_current_phase = tournament_phase_recital } } + add = contest_recital_aptitude_value + } + else_if = { + limit = { scope:activity = { has_current_phase = tournament_phase_horse_race } } + add = contest_horse_race_aptitude_value + } + else_if = { + limit = { scope:activity = { has_current_phase = tournament_phase_archery } } + add = contest_archery_aptitude_value + } + else = { add = contest_pugilism_aptitude_value } + + ### Boundaries ### + min = 1 +} + +contest_base_aptitude_value = 5 + +shared_tournament_aptitude_modifiers_value = { + value = 0 + if = { + limit = { has_character_modifier = unwilling_tourneyer_modifier } + add = -10 + } + if = { + limit = { has_character_modifier = generous_to_knights_modifier } + add = 5 + } +} + +contest_progress_increase_massive_value = 30 +contest_progress_increase_major_value = 25 +contest_progress_increase_medium_value = 20 +contest_progress_increase_minor_value = 15 +contest_progress_increase_miniscule_value = 10 + +contest_progress_decrease_massive_value = { + value = contest_progress_increase_massive_value + multiply = -1 +} +contest_progress_decrease_major_value = { + value = contest_progress_increase_major_value + multiply = -1 +} +contest_progress_decrease_medium_value = { + value = contest_progress_increase_minor_value + multiply = -1 +} +contest_progress_decrease_minor_value = { + value = contest_progress_increase_minor_value + multiply = -1 +} +contest_progress_decrease_miniscule_value = { + value = contest_progress_increase_miniscule_value + multiply = -1 +} + +tournament_team_alpha_size = { + scope:activity = { + every_guest_subset_current_phase = { name = team_alpha add = 1 } + } +} + +tournament_team_beta_size = { + scope:activity = { + every_guest_subset_current_phase = { name = team_beta add = 1 } + } +} + +# WAGERS +# Top = A, Bottom = B, Target = C, Odds percent = X +# (C - B) / (A - B) = X + +# A +tournament_wager_top_score_value = { value = scope:wager_top_contestant.var:contest_aptitude } + +# B +tournament_wager_bottom_score_value = { value = scope:wager_bottom_contestant.var:contest_aptitude } + +# C +tournament_wager_target_score_value = { value = scope:wager_target.var:contest_aptitude } + +# A - B +tournament_wager_top_minus_bottom_score_value = { + value = tournament_wager_top_score_value + subtract = tournament_wager_bottom_score_value +} + +# C - B +tournament_wager_target_minus_bottom_value = { + value = tournament_wager_target_score_value + subtract = tournament_wager_bottom_score_value +} + +# (C - B) / (A - B) = X +tournament_wager_odds_percent_value = { + value = tournament_wager_target_minus_bottom_value + divide = tournament_wager_top_minus_bottom_score_value + # Betting on yourself pays out less + if = { + limit = { scope:wagerer = scope:wager_target } + multiply = 1.5 + } + # Betting on mysterious stranger pays out more + if = { + limit = { + exists = scope:mysterious_stranger + scope:mysterious_stranger = scope:wager_target + } + multiply = 0.5 + } + min = 0 + max = 1 +} + +# Convert odds percent into multiplier +tournament_wager_payout_value = { + value = tiny_gold_value + if = { + limit = { tournament_wager_odds_percent_value >= 0.9 } + multiply = 1.25 # 4/1 + } + else_if = { + limit = { tournament_wager_odds_percent_value >= 0.8 } + multiply = 1.5 # 2/1 + } + else_if = { + limit = { tournament_wager_odds_percent_value >= 0.7 } + multiply = 2 # 1/2 + } + else_if = { + limit = { tournament_wager_odds_percent_value >= 0.6 } + multiply = 3 # 1/3 + } + else_if = { + limit = { tournament_wager_odds_percent_value >= 0.5 } + multiply = 4 # 1/4 + } + else_if = { + limit = { tournament_wager_odds_percent_value >= 0.4 } + multiply = 5 # 1/5 + } + else_if = { + limit = { tournament_wager_odds_percent_value >= 0.3 } + multiply = 6 # 1/6 + } + else_if = { + limit = { tournament_wager_odds_percent_value >= 0.2 } + multiply = 7 # 1/7 + } + else_if = { + limit = { tournament_wager_odds_percent_value >= 0.1 } + multiply = 8 # 1/8 + } + else = { multiply = 9 } # 1/9 + ceiling = yes +} + +# Payout minus gold value +tournament_wager_winning_value = { + value = tournament_wager_payout_value + subtract = tiny_gold_value +} + +tournament_wager_diff_value = { + value = tournament_wager_top_score_value + multiply = 0.5 +} + +tournament_versus_bout_delay_min = 1 + +tournament_versus_bout_delay_max = 6 + +tournament_versus_bout_summary_delay = 30 + +tournament_versus_duration_months = 1 # Versus must be specific duration to work - do not edit + +tournament_standard_duration_months = 1 + +tournament_qualification_duration_weeks = 8 + +tournament_turn_contest_duration_weeks = 3 + +tournament_team_contest_duration_weeks = 4 + +tournament_race_contest_duration_weeks = 3 + +tournament_intent_delay_min = 1 + +tournament_intent_delay_max = 2 + +tournament_contest_aptitude_diff_value = { + value = 0 + if = { + limit = { exists = var:progress_to_victory } + add = var:progress_to_victory + } + if = { + limit = { exists = scope:contest_compare.var:progress_to_victory } + subtract = scope:contest_compare.var:progress_to_victory + } +} + +tournament_active_phase_count_value = { + # 1-5 Phases: + value = 1 + # Tribes have less phases + # Removed; felt a little punishing - NM + #if = { + # limit = { + # NOT = { government_has_flag = government_is_tribal } + # } + # add = 1 + #} + # Extra phases unlocked over time + culture = { + if = { + limit = { has_cultural_era_or_later = culture_era_early_medieval } + add = 1 + } + if = { + limit = { + has_cultural_era_or_later = culture_era_high_medieval + } + add = 1 + } + if = { + limit = { has_cultural_era_or_later = culture_era_late_medieval } + add = 2 + } + } + # Some cultures like practicing war and words; unlock another slot in High medieval age as opposed to Late + culture = { + if = { + limit = { + NOT = { + has_cultural_era_or_later = culture_era_late_medieval + } + AND = { + has_cultural_era_or_later = culture_era_high_medieval + OR = { + has_cultural_pillar = heritage_north_germanic + has_cultural_pillar = heritage_frankish + has_cultural_pillar = heritage_iberian + has_cultural_pillar = heritage_latin + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_north_germanic + has_cultural_pillar = heritage_west_germanic + has_cultural_pillar = heritage_central_germanic + } + } + } + add = 1 + } + } +} + +contest_contestants_count_value = { + scope:activity = { + every_attending_character = { + limit = { activity_is_valid_tournament_contestant = yes } + add = 1 + } + } +} + +contest_guests_count_value = { + scope:activity = { + every_attending_character = { + limit = { + NOT = { activity_is_valid_tournament_contestant = yes } + } + add = 1 + } + } +} + +contest_declined_invites_count_value = { + scope:activity = { + every_invited_character = { + limit = { + NOT = { is_participant_in_activity = scope:activity } + } + add = 1 + } + } +} + +contest_valid_contestants_count_value = { + value = contest_contestants_count_value + add = contest_guests_count_value +} + +tournament_base_cost = { + value = 100 +} + +tournament_option_bad_cost = { + value = 20 +} + +tournament_option_normal_cost = { + value = 60 +} + +tournament_option_good_cost = { + value = 180 +} + +tournament_option_very_good_cost = { + value = 360 +} + +tournament_option_splendid_cost = { + value = 720 +} + +tournament_option_bad_era_scaled_cost = { + value = 20 + multiply = activity_cost_scale_by_era +} + +tournament_option_normal_era_scaled_cost = { + value = 60 + multiply = activity_cost_scale_by_era +} + +tournament_option_good_era_scaled_cost = { + value = 180 + multiply = activity_cost_scale_by_era +} + +tournament_option_very_good_era_scaled_cost = { + value = 360 + multiply = activity_cost_scale_by_era +} + +tournament_option_splendid_era_scaled_cost = { + value = 720 + multiply = activity_cost_scale_by_era +} + +tournament_contest_base_cost = 100 +tournament_contest_base_tribal_cost = { + value = tournament_contest_base_cost + divide = 2 +} +tournament_contest_horse_cost = 150 +tournament_contest_horse_tribal_cost = { + value = tournament_contest_horse_cost + divide = 2 +} +tournament_contest_cheap_cost = 50 +tournament_contest_cheap_tribal_cost = { + value = tournament_contest_cheap_cost + divide = 2 +} +tournament_contest_expensive_cost = 200 +tournament_contest_expensive_tribal_cost = { + value = tournament_contest_expensive_cost + divide = 2 +} +tournament_activity_cost_discount = { + value = 0.9 +} +tournament_activity_cost_discount_value = { + value = tournament_activity_cost_discount + subtract = 1 +} +tournament_activity_cost_max_discount = { + value = 0.75 +} +tournament_activity_cost_max_discount_value = { + value = tournament_activity_cost_max_discount + subtract = 1 +} +tournament_contest_cost_discount = { + value = 0.5 +} +tournament_contest_cost_discount_value = { + value = tournament_contest_cost_discount + subtract = 1 +} +tournament_contest_cost_low_discount = { + value = 0.9 +} +tournament_contest_cost_low_discount_value = { + value = tournament_contest_cost_low_discount + subtract = 1 +} + +contest_versus_qualified_count = 8 +contest_versus_semi_finalist_count = 4 +contest_versus_finalist_count = 2 + +progress_to_victory_passive_contestant_value = { + value = 0 + # if to avoid errors + if = { + limit = { exists = var:contest_aptitude } + value = { + value = var:contest_aptitude + multiply = 0.5 + } + } + if = { + limit = { has_court_position = champion_court_position } + add = 5 + } + if = { + limit = { exists = var:progress_to_victory_score } + add = { + value = var:progress_to_victory_score + #multiply = 0.5 + } + } + ceiling = yes + min = 1 + max = 25 +} + +## This variable is referenced in the UI. +progress_to_victory_current = { + value = 0 + if = { + limit = { exists = var:progress_to_victory } + add = var:progress_to_victory + } +} + +progress_to_victory_active_contestant_value = { + value = 0 + if = { + limit = { + involved_activity ?= { activity_tournament_versus_contest_trigger = no } + } + if = { + limit = { exists = var:contest_aptitude } + value = var:contest_aptitude + } + if = { + limit = { exists = var:progress_to_victory_score } + add = var:progress_to_victory_score + } + } + else = { + if = { + limit = { exists = var:contest_aptitude } + add = { + value = var:contest_aptitude + divide = 2 + } + } + if = { + limit = { exists = var:progress_to_victory_score } + add = { + value = var:progress_to_victory_score + divide = 2 + } + } + } + if = { + limit = { exists = var:progress_to_victory_score } + add = var:progress_to_victory_score + } + ceiling = yes + max = 90 + min = 1 +} + +base_progress_to_victory_qualified_value = 40 + +base_progress_to_victory_qualified_versus_value = 25 + +tournament_wait_time_before_start_months = 3 + +tournament_opening_event_weeks = { + value = tournament_wait_time_before_start_months + multiply = 4 + add = -1 +} + +# 1% increment: best - worst / 40 +progress_to_victory_increment_value = { + value = 30 + subtract = contest_base_aptitude_value # TODO_CD_EP2 use worst instead? + divide = 40 +} + +# PtV to qualify: this - worst / 1% increment +progress_to_victory_contestant_qualification_value = { + value = var:contest_aptitude + subtract = contest_base_aptitude_value # TODO_CD_EP2 use worst instead? + divide = progress_to_victory_increment_value + round = yes +} + +#EVENT VALUES + +skilled_enforcers_value = { + value = 0 + every_knight = { + limit = { + prowess >= 20 + } + add = 20 + } +} + +legendary_enforcers_value = { + value = 0 + every_knight = { + limit = { + prowess > 25 + } + add = 20 + } +} + +farrier_mistake_value = -5 + +jason_locale_events_210_desired_prowess_value = { + value = accolade_prowess_requirement_value + subtract = scope:foreign_knight.prowess +} + +jason_locale_events_210_desired_martial_value = { + value = maa_accolade_minimum_martial_value + subtract = scope:foreign_knight.martial +} + +#REWARD VALUES + +tournament_first_place_reward_prestige_major_value = major_prestige_gain +tournament_first_place_reward_prestige_medium_value = medium_prestige_gain +tournament_first_place_reward_prestige_minor_value = minor_prestige_gain + +tournament_second_place_reward_prestige_major_value = medium_prestige_gain +tournament_second_place_reward_prestige_medium_value = minor_prestige_gain +tournament_second_place_reward_prestige_minor_value = miniscule_prestige_gain + +tournament_third_place_reward_prestige_major_value = minor_prestige_gain +tournament_third_place_reward_prestige_medium_value = miniscule_prestige_gain +# Tournament not grand enough for a minor value. + +tournament_team_winner_reward_prestige_major_value = medium_prestige_gain +tournament_team_winner_reward_prestige_medium_value = minor_prestige_gain +tournament_team_winner_reward_prestige_minor_value = miniscule_prestige_gain + +tournament_team_loser_reward_prestige_major_value = minor_prestige_gain +tournament_team_loser_reward_prestige_medium_value = miniscule_prestige_gain +# Tournament not grand enough for a minor value. + +# Hastiludes XP randomiser + +tournament_hastiludes_xp_gain_miniscule_value = { + value = { 1 3 } +} + +tournament_hastiludes_xp_gain_minor_value = { + value = { 3 7 } +} + +tournament_hastiludes_xp_gain_medium_value = { + value = { 8 12 } +} + +tournament_hastiludes_xp_gain_major_value = { + value = { 13 17 } +} + +tournament_hastiludes_xp_gain_massive_value = { + value = 20 +} + +tournament_hastiludes_xp_loss_minor_value = { + value = -5 +} + +tournament_hastiludes_xp_loss_medium_value = { + value = -10 +} + +tournament_hastiludes_xp_loss_major_value = { + value = -15 +} + +tournament_base_cost_value = { + value = 200 +} diff --git a/common/script_values/04_ep2_wedding_values.txt b/common/script_values/04_ep2_wedding_values.txt new file mode 100644 index 00000000..c4a6e141 --- /dev/null +++ b/common/script_values/04_ep2_wedding_values.txt @@ -0,0 +1,1137 @@ +impress_intent_vassalization_acceptance_value = { # values synced with offer_vassalization_interaction + value = -50 + #Perks + if = { + limit = { + has_perk = true_ruler_perk + } + add = true_ruler_value + } + #Events + if = { + limit = { + has_character_modifier = event_bonus_to_vassal_accept + } + add = 20 + } + #Cultural Acceptance + if = { + limit = { + NOT = { has_same_culture_as = scope:impress_check } + culture = { + cultural_acceptance = { target = scope:impress_check.culture value <= 90 } + } + } + add = offer_vassalage_acceptance_value + } + #Different faith, no pluralism. + if = { + limit = { + scope:impress_check = { + NOR = { #Of two different faiths AND the potential vassal's faith is not pluralistic. + faith = root.faith + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + } + add = { + value = -40 + if = { + limit = { + scope:impress_check.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + add = -40 + } + if = { + limit = { + scope:impress_check.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + add = -40 + } + } + } + #Different faith, pluralism. + if = { + limit = { + scope:impress_check = { + NOT = { + faith = root.faith + } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + NOT = { + root.faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + add = { + value = -20 + if = { + limit = { + scope:impress_check.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + add = -20 + } + if = { + limit = { + scope:impress_check.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + add = -20 + } + } + } + #Different faith, both have pluralism. + if = { + limit = { + scope:impress_check = { + NOT = { + faith = root.faith + } + root.faith = { has_doctrine = doctrine_pluralism_pluralistic } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + add = { + value = -10 + if = { + limit = { + scope:impress_check.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + add = -10 + } + if = { + limit = { + scope:impress_check.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + add = -10 + } + } + } + #I am a King! + if = { + limit = { + scope:impress_check = { highest_held_title_tier = tier_kingdom } + } + add = { + value = -50 + if = { + limit = { + scope:impress_check = { + OR = { + government_has_flag = government_is_republic + government_has_flag = government_is_theocracy + } + } + } + add = -50 + } + if = { + limit = { + scope:impress_check.sub_realm_size >= 5 + } + add = -50 + } + if = { + limit = { + scope:impress_check.sub_realm_size >= 10 + } + add = -100 + } + } + } + #We just fought against each other. + if = { + limit = { + scope:impress_check = { + any_truce_holder = { + this = root + } + } + } + add = -50 + } + #I fought an independence war against you. + if = { + limit = { + scope:impress_check = { + exists = var:independence_war_former_liege + var:independence_war_former_liege = root + } + } + add = -200 + } + # I am Tribal and you are not + if = { + limit = { + scope:impress_check = { + government_has_flag = government_is_tribal + } + root = { + NOT = { government_has_flag = government_is_tribal } + } + } + add = -20 + } + # You are Tribal and I am not + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + scope:impress_check = { + NOT = { government_has_flag = government_is_tribal } + } + } + add = -20 + } + #Isolationist tradition + if = { + limit = { + NOT = { + root.culture = scope:impress_check.culture + } + scope:impress_check.culture = { + has_cultural_tradition = tradition_isolationist + } + } + add = -20 + } + #Bankrupt + if = { + limit = { + root.gold <= -1 + } + add = -100 + } + #Wide difference in rank + if = { + limit = { + root = { + tier_difference = { + target = scope:impress_check + value > 1 + } + } + } + add = 10 + } + # Allied + if = { + limit = { + scope:impress_check = { + is_allied_to = root + } + } + add = 20 + } + # Is the Rightful Liege of recipient + if = { + limit = { + is_rightful_liege_of = scope:impress_check + } + add = 20 + } + #Is not the Rightful Liege of recipient + else = { + add = -20 + } + # Encircled + if = { + limit = { + scope:impress_check = { + NOT = { + any_neighboring_top_liege_realm_owner = { + NOT = { + this = root + } + } + } + NOT = { + any_realm_county = { + is_coastal_county = yes + } + } + } + } + add = 20 + } + #Distant Realm — Overseas Connection + if = { + limit = { + root = { + character_is_realm_neighbor = scope:impress_check + NOT = { #Ibiza should want to be a vassal of Mallorca, etc. + character_is_land_realm_neighbor = scope:impress_check + is_rightful_liege_of = scope:impress_check + } + } + } + add = -100 + } + + if = { + limit = { + root = { + number_of_powerful_vassals >= 1 + } + } + add = { + value = 0 + root = { + every_powerful_vassal = { + limit = { + opinion = { target = root value <= -10 } + NOT = { opinion = { target = root value <= -20 } } + } + add = -10 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value <= -20 } + NOT = { opinion = { target = root value <= -30 } } + } + add = -20 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value <= -30 } + NOT = { opinion = { target = root value <= -40 } } + } + add = -30 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value <= -40 } + NOT = { opinion = { target = root value <= -50 } } + } + add = -40 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value <= -50 } + NOT = { opinion = { target = root value <= -60 } } + } + add = -50 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value <= -60 } + NOT = { opinion = { target = root value <= -70 } } + } + add = -60 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value <= -70 } + NOT = { opinion = { target = root value <= -80 } } + } + add = -70 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value <= -80 } + NOT = { opinion = { target = root value <= -90 } } + } + add = -80 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value <= -90 } + NOT = { opinion = { target = root value <= -100 } } + } + add = -90 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value <= -100 } + } + add = -100 + } + + every_powerful_vassal = { + limit = { + opinion = { target = root value < 10 } + NOT = { opinion = { target = root value > -10 } } + } + add = 1 + } + + every_powerful_vassal = { + limit = { + opinion = { target = root value >= 10 } + NOT = { opinion = { target = root value >= 20 } } + } + add = 10 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value >= 20 } + NOT = { opinion = { target = root value >= 30 } } + } + add = 20 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value >= 30 } + NOT = { opinion = { target = root value >= 40 } } + } + add = 30 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value >= 40 } + NOT = { opinion = { target = root value >= 50 } } + } + add = 40 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value >= 50 } + NOT = { opinion = { target = root value >= 60 } } + } + add = 50 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value >= 60 } + NOT = { opinion = { target = root value >= 70 } } + } + add = 60 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value >= 70 } + NOT = { opinion = { target = root value >= 80 } } + } + add = 70 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value >= 80 } + NOT = { opinion = { target = root value >= 90 } } + } + add = 80 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value >= 90 } + NOT = { opinion = { target = root value >= 100 } } + } + add = 90 + } + every_powerful_vassal = { + limit = { + opinion = { target = root value >= 100 } + } + add = 100 + } + + if = { + limit = { + number_of_powerful_vassals > 0 + } + divide = number_of_powerful_vassals + } + else = { + divide = 5 + } + divide = 5 + } + } + } + #Friend modifier. + if = { + limit = { + scope:impress_check = { + has_relation_friend = root + NOT = { has_relation_best_friend = root } + } + } + add = 10 + } + #Best Friend modifier. + if = { + limit = { + scope:impress_check = { + has_relation_best_friend = root + } + } + add = 20 + } + #Lover modifier. + if = { + limit = { + scope:impress_check = { + has_relation_lover = root + NOT = { has_relation_soulmate = root } + } + } + add = 10 + } + #Soulmate modifier. + if = { + limit = { + scope:impress_check = { + has_relation_soulmate = root + } + } + add = 20 + } + #Rivalry modifier. + if = { + limit = { + scope:impress_check = { + has_relation_rival = root + NOT = { has_relation_nemesis = root } + } + } + add = -100 + } + #Nemesis modifier. + if = { + limit = { + scope:impress_check = { + has_relation_nemesis = root + } + } + add = -1000 + } + #Same Dynasty modifier. + if = { + limit = { + scope:impress_check = { + dynasty = root.dynasty + } + } + add = 5 + } + # Same language + if = { + limit = { + root = { + knows_language_of_culture = scope:impress_check.culture + } + } + add = 5 + } + # Iberian Struggle, less likely for outsiders to vassalize inside + if = { + limit = { + root = { + NOT = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + } + scope:impress_check = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + } + add = -35 + } + #Ageism modifier vs kids. + if = { + limit = { + root = { + age < 12 + } + scope:impress_check = { + age > 16 + } + } + add = -5 + } + #Illegitimacy modifier. + if = { + limit = { + OR = { + AND = { + root = { + has_trait = bastard + } + scope:impress_check = { + faith = { NOT = { has_doctrine = doctrine_bastardry_none } } + } + } + has_trait = denounced + has_trait = disinherited + } + } + add = -10 + } + #Claimant modifier. + if = { + limit = { + root.primary_title = { + scope:impress_check = { + has_claim_on = prev + } + } + } + add = -20 + } + # Ambitious + if = { + limit = { + scope:impress_check = { + has_trait = ambitious + } + } + add = -20 + } + # Paranoid + if = { + limit = { + scope:impress_check = { + has_trait = paranoid + } + } + add = -20 + } + # Arrogant + if = { + limit = { + scope:impress_check = { + has_trait = arrogant + } + } + add = -20 + } + # Fickle + if = { + limit = { + scope:impress_check = { + has_trait = fickle + } + } + add = -10 + } + # Stubborn + if = { + limit = { + scope:impress_check = { + has_trait = stubborn + } + } + add = -10 + } + # Trusting + if = { + limit = { + scope:impress_check = { + has_trait = trusting + } + } + add = 5 + } + # Content + if = { + limit = { + scope:impress_check = { + has_trait = content + } + } + add = 5 + } + # OPINION INFLUENCE + if = { + limit = { + scope:impress_check = { + has_dread_level_towards = { + target = root + level = 1 + } + } + } + add = { + value = 10 + if = { + limit = { + root = { + exists = root.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } + } + } + if = { + limit = { + scope:impress_check = { + has_dread_level_towards = { + target = root + level = 2 + } + } + } + add = { + value = 20 + if = { + limit = { + root = { + exists = root.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } + } + } + + if = { + limit = { + root = { + has_royal_court = yes + has_dlc_feature = royal_court + has_court_type = court_diplomatic + court_grandeur_current_level >= 1 + } + } + add = { + value = root.court_grandeur_current + if = { + limit = { # Reduce the bonus if you are below your expected level + root = { + court_grandeur_current_level < court_grandeur_minimum_expected_level + } + } + multiply = 0.15 + } + else = { + multiply = 0.3 + } + } + } + # LEGITIMACY + if = { + limit = { + root = { + is_valid_for_legitimacy_change = yes + legitimacy_level != 3 + is_rightful_liege_of = scope:impress_check + } + } + add = { + value = 0 + if = { + limit = { root.legitimacy_level <= 2 } + add = -15 + } + if = { + limit = { root.legitimacy_level <= 1 } + add = -15 + } + if = { + limit = { root.legitimacy_level >= 4 } + add = 10 + } + if = { + limit = { root.legitimacy_level >= 5 } + add = 20 + } + if = { + limit = { root.legitimacy_level >= 6 } + add = 30 + } + } + } + + # AI-only weights, keep the pope from vassalizing too fast + if = { + limit = { + exists = faith:catholic.religious_head + faith:catholic.religious_head = root + root = { is_ai = yes } + } + add = -50 + } +} + +base_wedding_cost = { + # Base cost + value = 25 + if = { + limit = { + highest_held_title_tier >= tier_duchy + } + add = 25 + } + if = { + limit = { + highest_held_title_tier >= tier_kingdom + } + add = 75 + } + if = { + limit = { + highest_held_title_tier >= tier_empire + } + add = 75 + } +} + +#This is only to be used in the arrange marriage interaction window +ui_avg_wedding_cost = { + value = 0 + # Base Cost + add = { + value = root.base_wedding_cost + desc = WEDDING_BASE_COST + # Scale by Era + multiply = { + value = activity_cost_scale_by_era + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + # OPTIONS + add = { # Entertainment + add = { # Calculate the average of the three option costs + value = 0 + add = 20 # Bad Option Cost + add = 60 # Normal Option Cost + add = 180 # Good Option Cost + # Divide by the total number of option levels so we get an average option cost + divide = 3 + # Scale option costs by era + multiply = activity_cost_scale_by_era + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + add = { # Food + value = { # Calculate the average of the three option costs + value = 0 + add = 20 # Bad Option Cost + add = 60 # Normal Option Cost + add = 180 # Good Option Cost + # Scale option costs by era + multiply = activity_cost_scale_by_era + # Divide by the total number of option levels so we get an average option cost + divide = 3 + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + add = { # Decoration + value = { # Calculate the average of the three option costs + value = 0 + add = 40 # Bad Option Cost + add = 120 # Normal Option Cost + add = 360 # Good Option Cost + # Scale option costs by era + multiply = activity_cost_scale_by_era + # Divide by the total number of option levels so we get an average option cost + divide = 3 + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } +} + +base_bloody_wedding_cost = { + # Base cost + value = base_wedding_cost + multiply = 2.5 + subtract = base_wedding_cost +} + +real_wedding_cost_actor_scope = { + value = { + add = { + value = scope:actor.base_wedding_cost + desc = WEDDING_BASE_COST + } + multiply = { + value = activity_cost_scale_by_era + desc = activity_cost_scale_by_era_desc + } + # If there's a host already, scope into them. + if = { + limit = { exists = scope:actor } + # Dynasty Legacies. + if = { + limit = { + scope:actor.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + } + # Some people get one free. + if = { + limit = { + scope:actor = { + factor_zero_if_entitled_to_freebie_activity_trigger = yes + } + } + multiply = 0 + } + } + } +} + +ai_wedding_promise_gold_actor = { + # Base Cost + add = { + value = scope:actor.real_wedding_cost_actor_scope + } + + # OPTIONS + add = { # Entertainment + value = { # Calculate the average of the three option costs + value = 0 + add = 20 # Bad Option Cost + add = 60 # Normal Option Cost + add = 180 # Good Option Cost + # Scale option costs by era + multiply = scope:actor.activity_cost_scale_by_era + # Divide by the total number of option levels so we get an average option cost + divide = 3 + } + } + add = { # Food + value = { # Calculate the average of the three option costs + value = 0 + add = 20 # Bad Option Cost + add = 60 # Normal Option Cost + add = 180 # Good Option Cost + # Scale option costs by era + multiply = scope:actor.activity_cost_scale_by_era + # Divide by the total number of option levels so we get an average option cost + divide = 3 + } + } + add = { # Decoration + value = { # Calculate the average of the three option costs + value = 0 + add = 40 # Bad Option Cost + add = 120 # Normal Option Cost + add = 360 # Good Option Cost + # Scale option costs by era + multiply = scope:actor.activity_cost_scale_by_era + # Divide by the total number of option levels so we get an average option cost + divide = 3 + } + } + + if = { + limit = { exists = scope:actor } + # Dynasty Legacies. + if = { + limit = { + scope:actor.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + } + # Some people get one free. + if = { + limit = { + scope:actor = { + factor_zero_if_entitled_to_freebie_activity_trigger = yes + } + } + multiply = 0 + } + } +} + +real_wedding_cost_root_scope = { + value = { + add = { + value = base_wedding_cost + desc = WEDDING_BASE_COST + } + multiply = { + value = activity_cost_scale_by_era + desc = activity_cost_scale_by_era_desc + } + # If there's a host already, scope into them. + if = { + limit = { exists = this } + # Dynasty Legacies. + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + } + # Some people get one free. + if = { + limit = { + factor_zero_if_entitled_to_freebie_activity_trigger = yes + } + multiply = 0 + } + } + } +} + +real_wedding_cost_root_scope_plus_50 = { + value = { + add = { + value = base_wedding_cost + desc = WEDDING_BASE_COST + } + add = 50 + multiply = { + value = activity_cost_scale_by_era + desc = activity_cost_scale_by_era_desc + } + # If there's a host already, scope into them. + if = { + limit = { exists = this } + # Dynasty Legacies. + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + } + # Some people get one free. + if = { + limit = { + factor_zero_if_entitled_to_freebie_activity_trigger = yes + } + multiply = 0 + } + } + } +} + +marriage_recieve_proposal_cooldown = { + value = 0 + if = { + limit = { + is_ai = yes + scope:recipient ?= { is_ai = no } + } + add = 0.5 + } +} + +came_to_my_wedding_opinion_value_low = { + # Keep synced with came_to_my_wedding_opinion uses + value = 5 +} + +came_to_my_wedding_opinion_value_medium = { + # Keep synced with came_to_my_wedding_opinion uses + value = 10 +} + +came_to_my_wedding_opinion_value_high = { + # Keep synced with came_to_my_wedding_opinion uses + value = 15 +} + +number_of_current_and_former_spouses = { + value = 0 + every_spouse = { + add = 1 + } + every_former_spouse = { + add = 1 + } + every_memory = { + limit = { has_memory_type = spouse_died } + add = 1 + } +} + +wedding_ceremony_phase_duration = { + value = 2 + if = { + limit = { has_multiple_players = yes } + add = 2 + } +} + +dolt_stewardship_adjusted_difficulty_value = { + value = 24 + subtract = scope:dolt.stewardship +} diff --git a/common/script_values/05_bp2_hostage_values.txt b/common/script_values/05_bp2_hostage_values.txt new file mode 100644 index 00000000..a945ef53 --- /dev/null +++ b/common/script_values/05_bp2_hostage_values.txt @@ -0,0 +1,923 @@ +actor_current_military_strength = { + value = { + add = scope:actor.current_military_strength + } +} + +recipient_current_military_strength = { + value = { + add = scope:recipient.current_military_strength + } +} + +actor_ally_military_strength = { + value = 0 + scope:actor = { + every_ally = { add = current_military_strength } + } +} + +recipient_ally_military_strength = { + value = 0 + scope:recipient = { + every_ally = { add = current_military_strength } + } +} + +max_strength_ninety_percent_value = { + value = max_military_strength + multiply = 0.9 +} + +max_strength_seventy_five_percent_value = { + value = max_military_strength + multiply = 0.9 +} + +current_strength_ninety_percent_value = { + value = current_military_strength + multiply = 0.9 +} + +current_strength_seventy_five_percent_value = { + value = current_military_strength + multiply = 0.9 +} + +current_strength_with_allies_value = { + value = current_military_strength + every_ally = { add = current_military_strength } +} + +current_allies_strength_value = { + value = 0 + every_ally = { add = current_military_strength } +} + +current_strength_with_allies_fifty_percent_value = { + value = current_military_strength + every_ally = { add = current_military_strength } + multiply = 0.5 +} + +current_strength_with_allies_seventy_five_percent_value = { + value = current_military_strength + every_ally = { add = current_military_strength } + multiply = 0.75 +} + +recipient_strength_divided_by_actors_value = { + value = 1 + add = { + value = scope:recipient.current_military_strength # 1828 + scope:recipient = { + every_ally = { add = current_military_strength } + } + divide = { + value = scope:actor.current_military_strength # 1382 + scope:actor = { + every_ally = { add = current_military_strength } + } + min = 1 + } + # 1828 / 1382 = 1.32 + subtract = 1 # 1.32 - 1 = 0.32 + multiply = 100 # 0.32 * 100 = 32 + max = 50 + min = -50 + } + max = 20 +} + +hostage_secondary_recipient_place_in_succession = { + scope:recipient.primary_title = { + if = { + limit = { + place_in_line_of_succession = { target = scope:secondary_recipient value = 1 } + } + add = 4 + } + else_if = { + limit = { + place_in_line_of_succession = { target = scope:secondary_recipient value = 2 } + } + add = 3 + } + else_if = { + limit = { + place_in_line_of_succession = { target = scope:secondary_recipient value = 3 } + } + add = 2 + } + else = { add = 1 } + } +} + +hostage_secondary_actor_place_in_succession = { + scope:actor.primary_title = { + if = { + limit = { + place_in_line_of_succession = { target = scope:secondary_actor value = 1 } + } + add = 4 + } + else_if = { + limit = { + place_in_line_of_succession = { target = scope:secondary_actor value = 2 } + } + add = 3 + } + else_if = { + limit = { + place_in_line_of_succession = { target = scope:secondary_actor value = 3 } + } + add = 2 + } + else = { add = 1 } + } +} + +demand_hostage_acceptance_value = { + value = 10 + if = { + limit = { + NOR = { # Close in power + scope:actor.current_strength_ninety_percent_value > scope:recipient.current_military_strength + scope:actor.current_military_strength < scope:recipient.current_strength_ninety_percent_value + } + } + add = 10 + } +} + +bp2_yearly_6203_levy_size = { + value = 250 + multiply = { + value = 0 + add = scope:home_court.primary_title.tier + if = { + limit = { + scope:home_court.culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + add = 1 + } + else_if = { + limit = { + scope:home_court.culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = 1 + } + subtract = 1 + min = 1 + } +} + +bp2_yearly_6203_skirmishers_size = { + value = 1 + multiply = { + value = 0 + add = scope:home_court.primary_title.tier + if = { + limit = { + scope:home_court.culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + add = 1 + } + else_if = { + limit = { + scope:home_court.culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = 1 + } + subtract = 1 + min = 1 + } +} + +# Determine how much Prestige the Warden receives +# root - hostage +# scope:warden - warden +# scope:home_court - home court +hostage_prestige_income_value = { + # Defines + # < 20 - 0.1 per month + # 20-49 - 0.5 per month + # >= 50 - 1 per month + + value = 0 + if = { + limit = { + # No gain within dynasty + bp2_hostage_benefits_valid_trigger = yes + } + # Dynasty Level Difference + if = { + limit = { bp2_warden_dynasty_renown_lower_trigger = { WARDEN = scope:warden HOME_COURT = home_court } } + add = { + value = scope:home_court.dynasty.dynasty_prestige_level + subtract = scope:warden.dynasty.dynasty_prestige_level + min = 1 + multiply = 15 + desc = HOSTAGE_DYNASTY_PRESTIGE_LEVEL_DIFFERENCES + } + } + # Tier Difference + if = { + limit = { bp2_warden_title_tier_lower_trigger = { WARDEN = scope:warden HOME_COURT = home_court } } + add = { + value = scope:home_court.primary_title.tier + subtract = scope:warden.primary_title.tier + min = 1 + multiply = 15 + desc = HOSTAGE_TIER_DIFFERENCES_REASON + } + } + # Prestige Level Difference + if = { + limit = { bp2_warden_prestige_level_lower_trigger = { WARDEN = scope:warden HOME_COURT = home_court } } + add = { + value = scope:home_court.prestige_level + subtract = scope:warden.prestige_level + min = 1 + multiply = 15 + desc = HOSTAGE_PRESTIGE_DIFFERENCES_REASON + } + } + # Hostage from Liege or above + if = { + limit = { + scope:home_court = { is_liege_or_above_of = scope:warden } + } + add = { + value = 15 + desc = HOSTAGE_LIEGE_OF_WARDEN + } + } + if = { + limit = { + scope:warden = { has_character_flag = halved_hostage_prestige_income } + } + add = -25 + } + } +} + +# Determines how much Piety the Warden receives +# root - hostage +# scope:warden - warden +# scope:home_court - home court +hostage_piety_income_value = { + # Defines + # < 20 - 0.1 per month + # 20-49 - 0.5 per month + # >= 50 - 1 per month + + value = 0 + + if = { + limit = { + # No gain within same dynasty + bp2_hostage_benefits_valid_trigger = yes + # Piety gain only for lower renown or rank + OR = { + bp2_warden_dynasty_renown_lower_trigger = { + WARDEN = scope:warden + HOME_COURT = scope:home_court + } + bp2_warden_title_tier_lower_trigger = { + WARDEN = scope:warden + HOME_COURT = scope:home_court + } + } + } + # Faith Hostility + if = { + limit = { scope:warden.faith != scope:home_court.faith } + if = { + limit = { + scope:warden.faith = { + faith_hostility_level = { + target = scope:home_court.faith + value = faith_hostile_level + } + } + } + add = 10 + } + else_if = { + limit = { + scope:warden.faith = { + faith_hostility_level = { + target = scope:home_court.faith + value = faith_evil_level + } + } + } + add = 20 + } + } + # Dynasty Renown Difference + if = { + limit = { bp2_warden_dynasty_renown_lower_trigger = { WARDEN = scope:warden HOME_COURT = home_court } } + add = 10 + } + # Title Difference + if = { + limit = { bp2_warden_title_tier_lower_trigger = { WARDEN = scope:warden HOME_COURT = home_court } } + add = 10 + } + } +} + +# Determines how much Renown the Warden's Dynasty receives +# root - hostage +# scope:warden - warden +# scope:home_court - home court +hostage_renown_income_value = { + # Defines + # < 20 - nothing + # 20-49 - 0.25 per month + # >= 50 - 0.5 per month + + value = 0 + + if = { + limit = { bp2_hostage_benefits_valid_trigger = yes } # No gain within same dynasty + # Dynasty Renown Difference + if = { + limit = { bp2_warden_dynasty_renown_lower_trigger = { WARDEN = scope:warden HOME_COURT = home_court } } + add = { + value = scope:home_court.dynasty.dynasty_prestige_level + subtract = scope:warden.dynasty.dynasty_prestige_level + min = 1 + multiply = 20 + desc = HOSTAGE_DYNASTY_PRESTIGE_LEVEL_DIFFERENCES + } + } + # Title Tier Difference + if = { + limit = { bp2_warden_title_tier_lower_trigger = { WARDEN = scope:warden HOME_COURT = home_court } } + add = { + value = scope:home_court.primary_title.tier + subtract = scope:warden.primary_title.tier + min = 1 + multiply = 10 + desc = HOSTAGE_TIER_DIFFERENCES_REASON + } + } + } +} + +# Sorts hostages by relevance in various character lists +# root - hostage +hostage_value = { + value = 0 + # Age inversed, younger is better, over 25 is bad + if = { + limit = { age != 25 } + add = { + value = 25 + subtract = age + } + desc = HOSTAGE_AGE_REASON + } + # Bonus for young children + if = { + limit = { age <= 12 } + add = { + value = 10 + desc = HOSTAGE_CHILD_REASON + } + } + # Bonus for own children + if = { + limit = { is_child_of = scope:home_court } + add = { + value = 20 + desc = HOSTAGE_OWN_CHILD_REASON + } + } + # Bonus for own grandchildren + else_if = { + limit = { is_grandchild_of = scope:home_court } + add = { + value = 10 + desc = HOSTAGE_OWN_GRANDCHILD_REASON + } + } + # Line of succession + if = { + limit = { is_heir_of = scope:home_court } + add = { + value = 10 + scope:home_court.primary_title = { + if = { + limit = { + place_in_line_of_succession = { target = scope:hostage value = 1 } + } + add = 90 + } + else_if = { + limit = { + place_in_line_of_succession = { target = scope:hostage value = 2 } + } + add = 40 + } + else_if = { + limit = { + place_in_line_of_succession = { target = scope:hostage value = 3 } + } + add = 15 + } + } + desc = HOSTAGE_SUCCESSION_PLACE_REASON + } + } + # Non-inheriting + if = { + limit = { + OR = { + has_trait_with_flag = can_not_marry + switch = { + trigger = is_female + yes = { + scope:home_court = { has_realm_law = male_only_law } + } + no = { + scope:home_court = { has_realm_law = female_only_law } + } + } + } + } + add = { + value = -50 + desc = HOSTAGE_RECIPIENT_SEX_REASON + } + } + # Sickly + if = { + limit = { + OR = { + has_trait = sickly + has_weak_physical_health_traits_trigger = yes + has_short_disease_trigger = yes + has_serious_disease_trigger = yes + has_trait = incapable + has_trait = infirm + health <= poor_health + } + } + add = { + value = -25 + desc = HOSTAGE_SICK_REASON + } + } + # Bad genes + if = { + limit = { + OR = { + has_trait = physique_bad + has_trait = intellect_bad + has_trait = beauty_bad + has_trait = inbred + } + } + add = { + value = -15 + desc = HOSTAGE_BAD_GENES_REASON + } + } + # Good genes/healthy + if = { + limit = { + OR = { + has_trait = physique_good + has_trait = beauty_good + has_trait = intellect_good + has_trait = fecund + } + } + add = { + value = 15 + desc = HOSTAGE_GOOD_GENES_REASON + } + } + # Good genes/healthy + if = { + limit = { health >= good_health } + add = { + value = 10 + if = { + limit = { health >= excellent_health } + add = 10 + } + desc = HOSTAGE_HEALTHY_REASON + } + } + # Dynasty Level Difference + if = { + limit = { bp2_warden_dynasty_renown_lower_trigger = { WARDEN = scope:warden HOME_COURT = scope:home_court } } + add = { + value = scope:home_court.dynasty.dynasty_prestige_level + subtract = scope:warden.dynasty.dynasty_prestige_level + min = 1 + multiply = 20 + desc = HOSTAGE_RENOWN_DIFFERENCES_REASON + } + } + # Tier Difference + if = { + limit = { bp2_warden_title_tier_lower_trigger = { WARDEN = scope:warden HOME_COURT = scope:home_court } } + add = { + value = scope:home_court.primary_title.tier + subtract = scope:warden.primary_title.tier + min = 1 + multiply = 20 + desc = HOSTAGE_TIER_DIFFERENCES_REASON + } + } + # Prestige Level Difference + if = { + limit = { bp2_warden_prestige_level_lower_trigger = { WARDEN = scope:warden HOME_COURT = scope:home_court } } + add = { + value = scope:home_court.prestige_level + subtract = scope:warden.prestige_level + min = 1 + multiply = 20 + desc = HOSTAGE_PRESTIGE_DIFFERENCES_REASON + } + } + # Independence + if = { + limit = { + scope:home_court = { is_independent_ruler = yes } + } + add = { + value = 10 + desc = HOSTAGE_HOME_COURT_INDEPENDENT_RULER_REASON + } + } + # Neighboring + if = { + limit = { + scope:home_court = { character_is_land_realm_neighbor = scope:warden } + } + add = { + value = 10 + desc = HOSTAGE_HOME_COURT_NEIGHBORING_RULER_REASON + } + } + # Hostage from Liege or above + if = { + limit = { + scope:home_court = { is_liege_or_above_of = scope:warden } + } + add = { + value = 50 + desc = HOSTAGE_HOME_COURT_LIEGE_REASON + } + } +} + +# Positive actor interaction +interaction_actor_hostage_value = { + value = 0 + if = { + limit = { exists = scope:secondary_actor } + scope:actor = { save_temporary_scope_as = home_court } + scope:recipient = { save_temporary_scope_as = warden } + scope:secondary_actor = { save_temporary_scope_as = hostage } + add = scope:hostage.hostage_value + ceiling = yes + } +} + +# Negative recipient interaction +interaction_recipient_hostage_value = { + value = 0 + if = { + limit = { exists = scope:secondary_recipient } + scope:actor = { save_temporary_scope_as = warden } + scope:recipient = { save_temporary_scope_as = home_court } + scope:secondary_recipient = { save_temporary_scope_as = hostage } + add = scope:hostage.hostage_value + floor = yes + multiply = -1 # Negative as hostage value makes home court more reluctant + } +} + +# Positive actor interaction +war_actor_hostage_value = { + value = 0 + if = { + limit = { exists = scope:secondary_actor } + scope:actor = { save_temporary_scope_as = home_court } + scope:recipient = { save_temporary_scope_as = warden } + scope:secondary_actor = { save_temporary_scope_as = hostage } + add = scope:hostage.hostage_value + ceiling = yes + } + if = { # Cowardly characters more willing to use hostages + limit = { + exists = scope:warden + scope:warden.ai_boldness < 0 + } + add = { + value = scope:warden.ai_boldness + multiply = 0.2 + } + desc = HOSTAGE_AI_VALUE_MODIFIER_BOLDNESS + } + if = { # Compassionate characters are less willing to use hostages + limit = { + exists = scope:warden + scope:warden.ai_compassion > 0 + } + add = { + value = scope:warden.ai_compassion + multiply = -0.2 + } + desc = HOSTAGE_AI_VALUE_MODIFIER_COMPASSION + } + if = { # Greedy characters are more willing to gain but not give hostage + limit = { + exists = scope:warden + scope:warden.ai_greed != 0 + } + add = { + value = scope:warden.ai_greed + multiply = 0.2 + } + desc = HOSTAGE_AI_VALUE_MODIFIER_GREED + } + if = { # Honorable characters are more willing to use hostages, dishonorable only to take them + limit = { + exists = scope:warden + scope:warden.ai_honor != 0 + } + add = { + value = scope:warden.ai_honor + if = { + limit = { scope:warden.ai_honor < 0 } + multiply = -0.2 + } + else = { multiply = 0.2 } + } + + desc = HOSTAGE_AI_VALUE_MODIFIER_HONOR + } + if = { # Honorable characters are more willing to use hostages, dishonorable only when to take them + limit = { + exists = scope:home_court + scope:home_court.ai_honor > 0 + exists = scope:warden + scope:home_court = { is_vassal_of = scope:warden } + scope:warden = { has_realm_law_flag = vassal_refusal_is_treason } + } + add = { + value = scope:home_court.ai_honor + if = { + limit = { scope:warden.ai_honor < 0 } + multiply = -0.2 + } + else = { multiply = 0.2 } + } + desc = HOSTAGE_REALM_LAW_REASON + } + if = { # Rational characters are more willing to use hostages + limit = { + exists = scope:warden + scope:warden.ai_rationality != 0 + } + add = { + value = scope:warden.ai_rationality + multiply = 0.2 + } + desc = HOSTAGE_AI_VALUE_MODIFIER_RATIONALITY + } + if = { # Special trait bonus + limit = { + scope:home_court = { has_trait = education_diplomacy_5 } + } + add = { + value = 50 + } + desc = HOSTAGE_HOME_COURT_EDUCATION_REASON + } + divide = 10 + min = 1 + max = { + value = 15 + if = { + limit = { + scope:home_court = { has_trait = education_diplomacy_5 } + } + add = 10 + } + } + round = yes +} + +# Negative recipient interaction +war_recipient_hostage_value = { + value = 0 + if = { + limit = { exists = scope:secondary_recipient } + scope:actor = { save_temporary_scope_as = warden } + scope:recipient = { save_temporary_scope_as = home_court } + scope:secondary_recipient = { save_temporary_scope_as = hostage } + add = scope:hostage.hostage_value + floor = yes + multiply = -1 # Negative as hostage value makes home court more reluctant + } + # -7 + if = { # Cowardly characters more willing to use hostages + limit = { + exists = scope:home_court + scope:home_court.ai_boldness < 0 + } + add = { + value = scope:home_court.ai_boldness + multiply = -0.2 + } + desc = HOSTAGE_AI_VALUE_MODIFIER_BOLDNESS + } + if = { # Compassionate characters are less willing to use hostages + limit = { + exists = scope:home_court + scope:home_court.ai_compassion > 0 + } + add = { + value = scope:home_court.ai_compassion + multiply = -0.2 + } + desc = HOSTAGE_AI_VALUE_MODIFIER_COMPASSION + } + if = { # Greedy characters are more willing to gain but not give hostage + limit = { + exists = scope:home_court + scope:home_court.ai_greed != 0 + } + add = { + value = scope:home_court.ai_greed + multiply = -0.2 + } + desc = HOSTAGE_AI_VALUE_MODIFIER_GREED + } + if = { # Honorable characters are more willing to use hostages, dishonorable only to take them + limit = { + exists = scope:home_court + scope:home_court.ai_honor != 0 + } + add = { + value = scope:home_court.ai_honor + multiply = 0.2 + } + desc = HOSTAGE_AI_VALUE_MODIFIER_HONOR + } + if = { # Honorable characters are more willing to use hostages, dishonorable only when to take them + limit = { + exists = scope:home_court + scope:home_court.ai_honor > 0 + exists = scope:warden + scope:home_court = { is_vassal_of = scope:warden } + scope:warden = { has_realm_law_flag = vassal_refusal_is_treason } + } + add = { + value = scope:home_court.ai_honor + multiply = 0.2 + } + desc = HOSTAGE_REALM_LAW_REASON + } + if = { # Rational characters are more willing to use hostages + limit = { + exists = scope:home_court + scope:home_court.ai_rationality != 0 + } + add = { + value = scope:home_court.ai_rationality + multiply = 0.2 + } + desc = HOSTAGE_AI_VALUE_MODIFIER_RATIONALITY + } + divide = 10 + max = -1 + min = -15 + round = yes +} + +# Negative recipient interaction +interaction_relative_hostage_value = { + value = 0 + add = interaction_actor_hostage_value + subtract = interaction_recipient_hostage_value + round = yes +} + +# Negative recipient interaction +call_to_arms_hostage_value = { + home_court = { save_temporary_scope_as = home_court } + warden = { save_temporary_scope_as = warden } + save_temporary_scope_as = hostage + value = hostage_value +} + +bp2_hostage_loyalty_hook_chance_value = { + value = 20 + # Time - max +35 + if = { + limit = { + hostage_duration = { years >= 2 } + } + add = 5 + } + if = { + limit = { + hostage_duration = { years >= 4 } + } + add = 5 + } + if = { + limit = { + hostage_duration = { years >= 6 } + } + add = 5 + } + if = { + limit = { + hostage_duration = { years >= 8 } + } + add = 5 + } + if = { + limit = { + hostage_duration = { years >= 10 } + } + add = 10 + } + if = { + limit = { + hostage_duration = { years >= 14 } + } + add = 10 + } + # Traits - max +30 + if = { + limit = { has_trait = loyal } + add = 10 + } + else_if = { + limit = { has_trait = disloyal } + add = -10 + } + if = { + limit = { has_trait = trusting } + add = 10 + } + else_if = { + limit = { has_trait = paranoid } + add = -10 + } + if = { + limit = { has_trait = just } + add = 10 + } + else_if = { + limit = { has_trait = arbitrary } + add = -10 + } + # Opinion - max +33 + if = { + limit = { exists = scope:warden_opinion } + add = { + value = scope:warden_opinion + multiply = 0.33 + } + } +} + +hostage_adulthood_retained_halved_prestige_duration_value = 10 + +offer_hostage_military_strength_value = { + value = current_military_strength + multiply = 1.5 +} + +demand_hostage_military_strength_value = { + value = current_military_strength + multiply = 0.65 +} + +hostage_tier_check_value = { + value = highest_held_title_tier + subtract = 1 + min = tier_county +} diff --git a/common/script_values/06_ce1_epidemics_values.txt b/common/script_values/06_ce1_epidemics_values.txt new file mode 100644 index 00000000..367480ee --- /dev/null +++ b/common/script_values/06_ce1_epidemics_values.txt @@ -0,0 +1,2084 @@ +###################### +# Epidemics +###################### + +#### OUTBREAK CHANCE ### +# Chance for an outbreak of this intensity to spawn on a province per year +# % from 0-100 inclusive +# root = potential province + +### CONTROL VALUES ### +# These should be enough to change the balance of epidemics + +# Outbreak + +outbreak_chance_base_extra_low = 0.0005 +outbreak_chance_base_very_low = 0.001 +outbreak_chance_base_low = 0.01 +outbreak_chance_base_medium = 0.02 +outbreak_chance_base_high = 0.04 +outbreak_chance_base_very_high = 0.12 + +outbreak_increase_add_low = 0.004 +outbreak_increase_add_medium = 0.008 +outbreak_increase_add_high = 0.016 +outbreak_increase_add_very_high = 0.032 +outbreak_increase_add_extra_high = 0.064 + +outbreak_decrease_add_low = -0.003 +outbreak_decrease_add_medium = -0.008 +outbreak_decrease_add_high = -0.016 +outbreak_decrease_add_very_high = -0.032 +outbreak_decrease_add_unlikely = -0.064 + +outbreak_increase_mult_low = 0.1 +outbreak_increase_mult_medium = 0.2 +outbreak_increase_mult_high = 0.4 +outbreak_increase_mult_very_high = 0.8 + +outbreak_decrease_mult_low = -0.2 +outbreak_decrease_mult_medium = -0.35 +outbreak_decrease_mult_high = -0.6 +outbreak_decrease_mult_very_high = -0.8 +outbreak_decrease_mult_unlikely = -0.995 + +# Spread + +spread_chance_base_low = 3.5 +spread_chance_base_medium = 5 +spread_chance_base_high = 9 + +spread_increase_add_low = 2 +spread_increase_add_medium = 3 +spread_increase_add_high = 4 + +spread_decrease_add_low = -0.5 +spread_decrease_add_medium = -1 +spread_decrease_add_high = -2 +spread_decrease_add_very_high = -3 + +spread_increase_mult_low = 0.25 +spread_increase_mult_medium = 0.75 +spread_increase_mult_high = 1 +spread_increase_mult_very_high = 1.5 + +spread_decrease_mult_low = -0.25 +spread_decrease_mult_medium = -0.5 +spread_decrease_mult_high = -0.75 +spread_decrease_mult_unlikely = -0.991 + + +outbreak_chance_minor_default_value = { + value = outbreak_chance_base_low + #Buildings + if = { + limit = { + num_buildings >= 4 + } + add = { + value = num_buildings + multiply = outbreak_increase_add_low + } + } + + #Tradeports + if = { + limit = { + has_building_or_higher = common_tradeport_01 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_02 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_03 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_04 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_05 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_06 + } + add = outbreak_increase_add_high + } + if = { + limit = { + has_building_or_higher = common_tradeport_07 + } + add = outbreak_increase_add_high + } + if = { + limit = { + has_building_or_higher = common_tradeport_08 + } + add = outbreak_increase_add_high + } + + #Markets + if = { + limit = { + has_building_or_higher = market_villages_01 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = market_villages_02 + } + add = outbreak_increase_add_low + } + + #Guild Halls + if = { + limit = { + has_building_or_higher = guild_halls_01 + } + add = outbreak_increase_add_high + } + if = { + limit = { + has_building_or_higher = guild_halls_04 + } + add = outbreak_increase_add_high + } + if = { + limit = { + has_building_or_higher = guild_halls_06 + } + add = outbreak_increase_add_high + } + if = { + limit = { + has_building_or_higher = guild_halls_08 + } + add = outbreak_increase_add_high + } + + if = { + limit = { + OR = { + has_global_variable = is_in_tutorial + AND = { + has_global_variable = start_epidemic_grace + OR = { + county.holder = { is_ai = no } + county.holder = { + any_liege_or_above = { is_ai = no } + } + } + } + } + } + multiply = 0 + } +} + +outbreak_chance_minor_mult_value = { + value = 1 + + # Game rules + if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = outbreak_increase_mult_low + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = outbreak_increase_mult_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_rare + } + add = outbreak_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_rare + } + add = outbreak_decrease_mult_high + } + + #Development + add = { + value = county.development_level + multiply = 0.002 + } + + #Era pacing + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + add = 0 + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + add = 0 + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_tribal + } + } + add = outbreak_decrease_mult_low + } + + #Terrain + if = { + limit = { + OR = { + terrain = hills + terrain = forest + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = outbreak_increase_mult_low + } + + #Developed places + if = { + limit = { + has_holding = yes + } + add = outbreak_increase_mult_low + } + if = { + limit = { + has_holding_type = city_holding + } + add = outbreak_increase_mult_low + } + + multiply = 0.8 + min = 0.001 +} + +outbreak_chance_major_default_value = { + value = outbreak_chance_base_very_low + + #Buildings + if = { + limit = { + num_buildings >= 6 + } + add = { + value = num_buildings + multiply = outbreak_increase_add_low + } + } + + #Tradeports + if = { + limit = { + has_building_or_higher = common_tradeport_01 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_02 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_03 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_04 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_05 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_06 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_07 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_08 + } + add = outbreak_increase_add_medium + } + + #Markets + if = { + limit = { + has_building_or_higher = market_villages_01 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = market_villages_02 + } + add = outbreak_increase_add_low + } + + #Guild Halls + if = { + limit = { + has_building_or_higher = guild_halls_01 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = guild_halls_02 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = guild_halls_03 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = guild_halls_04 + } + add = outbreak_increase_add_medium + } + + if = { + limit = { + OR = { + has_global_variable = is_in_tutorial + AND = { + has_global_variable = start_epidemic_grace + OR = { + county.holder = { is_ai = no } + county.holder = { + any_liege_or_above = { is_ai = no } + } + } + } + } + } + multiply = 0 + } +} + +outbreak_chance_major_mult_value = { + value = 0.8 + + # Game rules + if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = outbreak_increase_mult_low + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = outbreak_increase_mult_high + } + else_if = { + limit = { + OR = { + has_game_rule = epidemic_frequency_rare + has_game_rule = easy_difficulty + } + } + add = outbreak_decrease_mult_medium + } + else_if = { + limit = { + OR = { + has_game_rule = epidemic_frequency_very_rare + has_game_rule = very_easy_difficulty + } + } + add = outbreak_decrease_mult_high + } + + #Development + add = { + value = county.development_level + multiply = 0.008 + } + + #Era pacing + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = 0 + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + add = 0 + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_tribal + } + } + add = outbreak_decrease_mult_medium + } + + #Terrain + if = { + limit = { + OR = { + terrain = hills + terrain = forest + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = outbreak_increase_mult_low + } + + #Developed places + if = { + limit = { + has_holding = yes + } + add = outbreak_increase_mult_low + } + if = { + limit = { + has_holding_type = city_holding + } + add = outbreak_increase_mult_low + } + + multiply = 1.05 + + min = 0.001 +} + +outbreak_chance_apocalyptic_default_value = { + value = outbreak_chance_base_extra_low + + #Buildings + if = { + limit = { + num_buildings >= 10 + } + add = { + value = num_buildings + multiply = outbreak_increase_add_low + } + } + + #Tradeports + if = { + limit = { + has_building_or_higher = common_tradeport_01 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_02 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_03 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_04 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_05 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_06 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_07 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_08 + } + add = outbreak_increase_add_medium + } + + #Markets + if = { + limit = { + has_building_or_higher = market_villages_01 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = market_villages_02 + } + add = outbreak_increase_add_low + } + + #Guild Halls + if = { + limit = { + has_building_or_higher = guild_halls_01 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = guild_halls_02 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = guild_halls_03 + } + add = outbreak_increase_add_low + } + if = { + limit = { + has_building_or_higher = guild_halls_04 + } + add = outbreak_increase_add_low + } + + if = { + limit = { + OR = { + has_global_variable = is_in_tutorial + AND = { + has_global_variable = start_epidemic_grace + OR = { + county.holder = { is_ai = no } + county.holder = { + any_liege_or_above = { is_ai = no } + } + } + } + } + } + multiply = 0 + } +} + +outbreak_chance_apocalyptic_mult_value = { + value = 0.5 + + # Game rules + if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = outbreak_increase_mult_low + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = outbreak_increase_mult_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_rare + } + add = outbreak_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_rare + } + add = outbreak_decrease_mult_high + } + + #Development + add = { + value = county.development_level + multiply = 0.008 + } + + #Era pacing + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = 0 + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + add = outbreak_decrease_mult_medium + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + add = outbreak_decrease_mult_unlikely + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_tribal + } + } + add = outbreak_decrease_mult_unlikely + } + + #Terrain + if = { + limit = { + OR = { + terrain = hills + terrain = forest + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = outbreak_increase_mult_low + } + + #Developed places + if = { + limit = { + has_holding = yes + } + add = outbreak_increase_mult_low + } + if = { + limit = { + has_holding_type = city_holding + } + add = outbreak_increase_mult_low + } + + multiply = 1.05 + + min = 0.0005 +} + + +outbreak_chance_dysentery_default_value = { + + value = outbreak_chance_base_low #Shouldn't happen unless there's an army present + if = { + limit = { + any_army_in_location ?= { + OR = { + is_army_in_combat = yes + is_army_in_raid = yes + } + } + } + add = outbreak_increase_add_extra_high + } + if = { + limit = { + any_army_in_location ?= { + count >= 1 + } + } + add = outbreak_increase_add_very_high + + } + if = { + limit = { + any_army_in_location ?= { + is_army_in_siege = yes + } + } + add = outbreak_increase_add_extra_high + if = { + limit = { + fort_level >= 12 + } + add = outbreak_increase_add_very_high + } + if = { + limit = { + fort_level >= 10 + } + add = outbreak_increase_add_high + } + if = { + limit = { + fort_level >= 8 + } + add = outbreak_increase_add_high + } + if = { + limit = { + fort_level >= 4 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + fort_level > 2 + } + add = outbreak_increase_add_low + } + } + + if = { + limit = { + OR = { + has_global_variable = is_in_tutorial + AND = { + has_global_variable = start_epidemic_grace + OR = { + county.holder = { is_ai = no } + county.holder = { + any_liege_or_above = { is_ai = no } + } + } + } + } + } + multiply = 0 + } +} + +outbreak_chance_dysentery_mult_value = { + value = 1 + min = 0.001 + # Game rules + if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = outbreak_increase_mult_low + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = outbreak_increase_mult_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_rare + } + add = outbreak_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_rare + } + add = outbreak_decrease_mult_high + } + + #Era pacing + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = 0 + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + add = 0 + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_tribal + } + } + add = outbreak_decrease_mult_medium + } + + #Terrain + if = { + limit = { + OR = { + terrain = hills + terrain = forest + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = outbreak_increase_mult_low + } + + #Developed places + if = { + limit = { + has_holding = yes + } + add = outbreak_increase_mult_low + } + if = { + limit = { + has_holding_type = city_holding + } + add = outbreak_increase_mult_low + } +} + +outbreak_chance_black_plague_default_value = { + value = outbreak_chance_base_extra_low + + #Buildings + if = { + limit = { + num_buildings >= 20 + } + add = { + value = num_buildings + multiply = outbreak_increase_add_medium + } + } + + if = { + limit = { + has_building_or_higher = common_tradeport_03 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_04 + } + add = outbreak_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_05 + } + add = outbreak_increase_add_high + } + if = { + limit = { + has_building_or_higher = common_tradeport_06 + } + add = outbreak_increase_add_high + } + if = { + limit = { + has_building_or_higher = common_tradeport_07 + } + add = outbreak_increase_add_high + } + if = { + limit = { + has_building_or_higher = common_tradeport_08 + } + add = outbreak_increase_add_high + } + + if = { + limit = { + has_game_rule = epidemic_frequency_disabled + } + multiply = 0 + } + + if = { + limit = { + has_game_rule = bd_occurrence_random + } + add = outbreak_increase_add_high + } + + if = { + limit = { + OR = { + has_global_variable = is_in_tutorial + AND = { + has_global_variable = start_epidemic_grace + OR = { + county.holder = { is_ai = no } + county.holder = { + any_liege_or_above = { is_ai = no } + } + } + } + } + } + multiply = 0 + } +} + +outbreak_chance_black_plague_mult_value = { + value = 1 + min = 0.001 + #Development + add = { + value = county.development_level + multiply = 0.08 + } + + # Game rules + if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = outbreak_increase_mult_low + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = outbreak_increase_mult_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_rare + } + add = outbreak_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_rare + } + add = outbreak_decrease_mult_high + } + + #Era pacing + if = { + limit = { + NOR = { + has_game_rule = bd_occurrence_random + has_game_rule = bd_frequency_unlimited + } + } + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + add = outbreak_decrease_mult_medium + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + add = outbreak_decrease_mult_high + } + else_if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_tribal + } + } + add = outbreak_decrease_mult_unlikely + } + } + + #Terrain + if = { + limit = { + OR = { + terrain = hills + terrain = forest + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = outbreak_increase_mult_low + } + + #Developed places + if = { + limit = { + has_holding = yes + } + add = outbreak_increase_mult_low + } + if = { + limit = { + has_holding_type = city_holding + } + add = outbreak_increase_mult_low + } +} + +#### SPREAD CHANCE ### +#Controls the spread of the epidemic +#root = potential_province + +spread_chance_epidemics_default_value = { + if = { + limit = { + scope:epidemic = { + outbreak_intensity = apocalyptic + } + } + add = spread_chance_base_high + } + else_if = { + limit = { + scope:epidemic = { + outbreak_intensity = major + } + } + add = spread_chance_base_medium + } + else = { #minor + add = spread_chance_base_low + } + + #less patchy, add + if = { + limit = { + county = { + any_county_province = { + any_province_epidemic = { + this.epidemic_type = scope:epidemic.epidemic_type + } + } + } + } + add = spread_increase_add_high + } + + #Dysentery spreads to armies and forts + if = { + limit = { scope:epidemic.epidemic_type = epidemic_type:dysentery } + add = { + if = { + limit = { + any_army_in_location ?= { + is_army_in_siege = yes + } + } + add = spread_increase_add_high + } + if = { + limit = { + any_army_in_location ?= { + OR = { + is_army_in_combat = yes + is_army_in_raid = yes + } + } + } + add = spread_increase_add_medium + } + if = { + limit = { + any_army_in_location ?= { + count >= 1 + } + } + add = spread_increase_add_high + } + } + add = { + value = fort_level + multiply = spread_increase_mult_low + } + } + + #Buildings + add = { + value = num_buildings + multiply = spread_increase_mult_low + } + + #Tradeports + if = { + limit = { + has_building_or_higher = common_tradeport_01 + } + add = spread_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_02 + } + add = spread_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_03 + } + add = spread_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_04 + } + add = spread_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_05 + } + add = spread_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_06 + } + add = spread_increase_add_medium + } + if = { + limit = { + has_building_or_higher = common_tradeport_07 + } + add = spread_increase_add_high + } + if = { + limit = { + has_building_or_higher = common_tradeport_08 + } + add = spread_increase_add_high + } + + #Markets + if = { + limit = { + has_building_or_higher = market_villages_01 + } + add = spread_increase_add_low + } + if = { + limit = { + has_building_or_higher = market_villages_02 + } + add = spread_increase_add_low + } + + #Guild Halls + if = { + limit = { + has_building_or_higher = guild_halls_02 + } + add = spread_increase_add_high + } + if = { + limit = { + has_building_or_higher = guild_halls_04 + } + add = spread_increase_add_high + } + if = { + limit = { + has_building_or_higher = guild_halls_06 + } + add = spread_increase_add_high + } + if = { + limit = { + has_building_or_higher = guild_halls_08 + } + add = spread_increase_add_high + } + + + #Terrain + if = { + limit = { + terrain = farmlands + } + add = spread_increase_add_medium + } + else_if = { + limit = { + OR = { + terrain = floodplains + terrain = wetlands + } + } + add = spread_increase_add_low + } + else_if = { + limit = { + OR = { + terrain = plains + terrain = steppe + } + } + add = spread_increase_add_low + } + else_if = { + limit = { + OR = { + terrain = hills + terrain = drylands + terrain = oasis + terrain = forest + } + } + add = spread_decrease_add_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = spread_decrease_add_medium + } + else_if = { + limit = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = spread_decrease_add_medium + } + #Island? + if = { + limit = { + geographical_region = divergence_island_regions + } + add = spread_decrease_add_medium + } + #Cultural Traditions + if = { + limit = { + county.culture = { + OR = { + has_cultural_tradition = tradition_city_keepers + has_cultural_tradition = tradition_maritime_mercantilism + } + } + } + add = spread_increase_add_medium + } + else_if = { + limit = { + county.culture = { + OR = { + has_cultural_tradition = tradition_esteemed_hospitality + has_cultural_tradition = tradition_horse_lords + has_cultural_tradition = tradition_caravaneers + has_cultural_tradition = tradition_seafaring + } + } + } + add = spread_increase_add_low + } + else_if = { + limit = { + county.culture = { + OR = { + has_cultural_tradition = tradition_practiced_pirates + has_cultural_tradition = tradition_parochialism + } + } + } + add = spread_increase_add_low + } + if = { + limit = { + county.culture = { + has_cultural_tradition = tradition_hidden_cities + } + } + add = spread_decrease_add_high + } + else_if = { + limit = { + county.culture = { + has_cultural_parameter = less_plague_spread_culture + } + } + add = spread_decrease_add_high + } + + #Reinfection shouldn't happen often + if = { + limit = { + scope:epidemic = { + is_target_in_variable_list = { + name = epidemic_cooldown + } + } + } + add = spread_decrease_add_very_high + } +} + +spread_chance_epidemics_mult_value = { + value = 1 + min = 0.001 + #Coastal Statistics Squash + if = { + limit = { + OR = { + is_coastal = yes + is_riverside_province = yes + } + NOR = { + has_building_or_higher = common_tradeport_04 + num_buildings > 4 + } + } + add = spread_decrease_mult_medium + } + + #Making sure that England gets properly rekted by the Black Plague + if = { + limit = { + has_global_variable = black_death + scope:epidemic = global_var:black_death + OR = { + is_coastal = yes + is_riverside_province = yes + } + has_building_or_higher = common_tradeport_06 + num_buildings > 10 + } + add = spread_increase_mult_very_high + } + + #less patchy, mult + if = { + limit = { + county = { + any_county_province = { + any_province_epidemic = { + this.epidemic_type = scope:epidemic.epidemic_type + } + } + } + } + add = spread_increase_mult_very_high + } + + #Development + add = { + value = county.development_level + multiply = 0.025 + } + + + # Game rules + if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = spread_increase_mult_very_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = spread_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = spread_increase_mult_low + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_rare + } + add = spread_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_rare + } + add = spread_decrease_mult_low + } + + #Intensity mult + + if = { + limit = { + scope:epidemic = { + outbreak_intensity = apocalyptic + } + } + add = spread_increase_mult_high + } + else_if = { + limit = { + scope:epidemic = { + outbreak_intensity = major + } + } + add = spread_increase_mult_medium + } + + #Recent Epidemics + if = { + limit = { + is_target_in_variable_list = { + name = epidemic_cooldown #Average lifespan + target = scope:epidemic.epidemic_type + } + } + if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = spread_decrease_mult_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = spread_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = spread_decrease_mult_low + } + else = { + add = spread_decrease_mult_unlikely + } + } + + #People still remember how to social distance in general + if = { + limit = { + has_variable = epidemic_cooldown_general #Average social memory + } + if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = spread_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = spread_decrease_mult_low + } + else = { + add = spread_decrease_mult_high + } + } + + #Developed places + if = { + limit = { + has_holding = yes + } + add = spread_increase_mult_low + } + if = { + limit = { + OR = { + has_holding_type = castle_holding + has_holding_type = church_holding + } + } + add = spread_increase_mult_low + } + if = { + limit = { + has_holding_type = city_holding + } + add = spread_increase_mult_medium + } +} + +#### DAILY INFECTION RATE ### +#The velocity at which the infection rate goes up in a province + +infection_rate_change_value = { + +} + +#### CHARACTER INFECTION CHANCE ### +#Monthly chance for an epidemic to infect a character in the province + +would_follow_social_distancing_value = { + value = -1 #let's assume medieval people wouldn't by default + if = { + limit = { has_perk = wash_your_hands_perk } + add = 10 + } + if = { + limit = { has_trait = shy } + add = 1 + } + if = { + limit = { has_trait = paranoid } + add = 2 + } + if = { + limit = { has_trait = reclusive } + add = 4 + } + if = { + limit = { has_trait = shrewd } + add = 1 + } + if = { + limit = { has_trait = lifestyle_physician } + add = 4 + } + if = { + limit = { has_trait = lifestyle_herbalist } + add = 2 + } + if = { + limit = { has_trait = diligent } + add = 1 + } + if = { + limit = { has_trait = craven } + add = 1 + } + if = { + limit = { has_trait = temperate } + add = 1 + } + if = { + limit = { has_trait = arbitrary } + add = -1 + } + if = { + limit = { has_trait = brave } + add = -1 + } + if = { + limit = { has_trait = impatient } + add = -2 + } + if = { + limit = { has_trait = gregarious } + add = -4 + } + if = { + limit = { has_trait = dull } + add = -2 + } + #Would your culture be touchy?/take this seriously + if = { + limit = { culture = { has_cultural_tradition = tradition_fp2_ritualised_friendship } } + add = -1 + } + if = { + limit = { culture = { has_cultural_tradition = tradition_life_is_just_a_joke } } + add = -1 + } + if = { + limit = { culture = { has_cultural_parameter = better_disease_resistance } } + add = 20 + } +} + +character_infection_chance_default_value = { + value = 10 + #If you're already sick/weak you're screwed + if = { + limit = { + OR = { + has_trait = sickly + has_trait = inbred + health <= poor_health + } + } + add = 20 + } + #Epidemic Intensity + if = { + limit = { + scope:epidemic ?= { + outbreak_intensity = apocalyptic + epidemic_type.epidemic_trait = trait:bubonic_plague + } + } + add = 40 + } + else_if = { + limit = { + scope:epidemic ?= { + outbreak_intensity = apocalyptic + NOT = { epidemic_type.epidemic_trait = trait:bubonic_plague } + } + } + add = 30 + } + else_if = { + limit = { + scope:epidemic ?= { + outbreak_intensity = major + } + } + add = 20 + } + else = { #minor + add = 10 + } + #Let's see if you have any advantageous traits/perks / Wash your hands is included in the social distancing calculation, these are purely health related + if = { + limit = { + has_trait = athletic + } + add = -4 + } + if = { + limit = { + has_perk = iron_constitution_perk + } + add = -6 + } + if = { + limit = { + has_perk = healthy_perk + } + add = -8 + } + if = { + limit = { + has_trait = whole_of_body + } + add = -10 + } + #Things to bump the numbers + if = { + limit = { + is_foreign_court_or_pool_guest = yes + } + add = 40 + } + if = { + limit = { + is_ruler = no + } + add = 10 + } + #Children getting hit with measles + if = { + limit = { + scope:epidemic.epidemic_type.epidemic_trait = trait:measles + is_adult = no + } + add = 20 + } + #"Old" people get hit more in general + if = { + limit = { + age >= 65 + } + add = 40 + } + else_if = { + limit = { + age >= 50 + } + add = 20 + } + # Camp resistance. + if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_1 } + } + # Max buff. + if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_6 } + } + add = -40 + } + # Very high buff. + else_if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_5 } + } + add = -30 + } + # High buff. + else_if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_4 } + } + add = -25 + } + # Medium buff. + else_if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_3 } + } + add = -20 + } + # Small buff. + else_if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_2 } + } + add = -15 + } + # Slight buff. + else_if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_1 } + } + add = -10 + } + } + #Would you follow social distancing? + #your numerical social distance value gets transformed here into a bonus/malus + add = { + value = would_follow_social_distancing_value + multiply = -1 #inverted value + } + #How infected is your location? + #Follows the infection rate thresholds set for the barony/county modifiers + if = { + limit = { + location = { epidemic_resistance > 80 } + } + multiply = 0.25 + } + else_if = { + limit = { + location = { epidemic_resistance > 50 } + } + multiply = 0.5 + } + else_if = { + limit = { + location = { epidemic_resistance > 10 } + } + multiply = 0.75 + } + #Are you taking proper measures? + if = { + limit = { + has_character_modifier = isolating_modifier + } + multiply = 0.25 #75% less likely + } + #How infected is your location? + #Follows the infection rate thresholds set for the barony/county modifiers + if = { + limit = { + scope:province = { epidemic_resistance > 80 } + } + multiply = 0.25 + } + else_if = { + limit = { + scope:province = { epidemic_resistance > 50 } + } + multiply = 0.5 + } + else_if = { + limit = { + scope:province = { epidemic_resistance > 10 } + } + multiply = 0.75 + } + min = 1 # Never totally immune +} + +#How contagious is this character? +character_contagious_value = { + add = { #would they follow social distancing? + value = would_follow_social_distancing_value + multiply = -1 #inverted + } + if = { + limit = { + has_trait = wheezing + } + add = 4 + } +} + +recent_epidemics_outbreak_mult_value = { + value = 1 + min = 0.001 + #Recently recovered from this epidemic + if = { + limit = { + is_target_in_variable_list = { + name = epidemic_cooldown #Average lifespan + target = scope:epidemic_type + } + } + if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + value = outbreak_decrease_mult_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + value = outbreak_decrease_mult_medium + } + else = { + value = outbreak_decrease_mult_unlikely + } + + } + + #People still remember how to social distance in general + else_if = { + limit = { + has_variable = epidemic_cooldown_general #Average social memory + } + if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + value = outbreak_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + value = outbreak_decrease_mult_low + } + else = { + value = outbreak_decrease_mult_high + } + } +} + +#How badly effected is a county's development? +epidemic_development_loss_value = { + subtract = scope:base_loss + + #This feeds into the change_development_progress in 00_epidemics + #Bear in mind that minimal_development_progress_loss is 10 + #and massive_development_progress_loss is 100 + #Aim for something between those two extremes generally (in minus) + + #Since we have widespread development loss handled by modifier, we + #now use this figure to 'chunk' down places with very high development + #so they are disproportionately affected + + scope:epidemic = { + switch = { + trigger = outbreak_intensity + minor = { subtract = 2.5 } + major = { subtract = 5 } + apocalyptic = { subtract = 7.5 } + } + } + + # Development + subtract = { + value = development_level + multiply = 0.3 + } + + multiply = { + value = 6 + divide = num_county_holdings + } + + multiply = { + value = 100 + subtract = title_province.epidemic_resistance + multiply = 0.005 + add = 1 + } +} + +epidemic_fromdust_value = { + value = minor_gold_value + multiply = former_infected_county_count +} + +former_infected_county_count = { + value = 1 + every_in_list = { + variable = formerly_infected_counties + add = 0.1 + } +} diff --git a/common/script_values/06_ce1_legends_values.txt b/common/script_values/06_ce1_legends_values.txt new file mode 100644 index 00000000..0c957140 --- /dev/null +++ b/common/script_values/06_ce1_legends_values.txt @@ -0,0 +1,1505 @@ +###################### +# Legends +###################### + +#### SPREAD CHANCE ### +# Chance for an legend of this quality to spread to an adjacent province per month +# % from 0-100 inclusive +# root = potential province +# scope:legend = the legend + +### CONTROL VALUES ### +# These should be enough to change the balance of legends + +# legend seed drop chance + +legend_seed_chance_very_low = 5 +legend_seed_chance_low = 15 +legend_seed_chance_medium = 40 +legend_seed_chance_high = 75 + +# Spread + +legend_spread_chance_base = 0.5 + +legend_spread_increase_add_miniscule = 0.06 +legend_spread_increase_add_very_low = 0.12 +legend_spread_increase_add_low = 0.25 +legend_spread_increase_add_medium = 0.5 +legend_spread_increase_add_high = 1 +legend_spread_increase_add_very_high = 1.5 + +legend_spread_decrease_add_very_low = -0.12 +legend_spread_decrease_add_low = -0.25 +legend_spread_decrease_add_medium = -0.5 +legend_spread_decrease_add_high = -1 + +legend_spread_increase_mult_low = 0.25 +legend_spread_increase_mult_medium = 0.75 +legend_spread_increase_mult_high = 1.5 + +legend_spread_decrease_mult_low = -0.15 +legend_spread_decrease_mult_medium = -0.25 +legend_spread_decrease_mult_high = -0.5 +legend_spread_decrease_mult_unlikely = -0.99 + + + +spread_chance_legends_default_value = { + value = legend_spread_chance_base + + if = { + limit = { + scope:legend = { legend_quality = illustrious } + } + add = legend_spread_increase_add_low + } + else_if = { + limit = { + scope:legend = { legend_quality = mythical } + } + add = legend_spread_increase_add_medium + } + + #Buildings in which people gossip + if = { + limit = { + has_building_or_higher = common_tradeport_01 + } + add = legend_spread_increase_add_miniscule + } + if = { + limit = { + has_building_or_higher = common_tradeport_03 + } + add = legend_spread_increase_add_very_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_05 + } + add = legend_spread_increase_add_low + } + if = { + limit = { + has_building_or_higher = common_tradeport_07 + } + add = legend_spread_increase_add_low + } + + if = { + limit = { + has_building_or_higher = city_02 + } + add = legend_spread_increase_add_miniscule + } + if = { + limit = { + has_building_or_higher = city_03 + } + add = legend_spread_increase_add_low + } + + if = { + limit = { + has_building_or_higher = market_villages_01 + } + add = legend_spread_increase_add_miniscule + } + if = { + limit = { + has_building_or_higher = market_villages_02 + } + add = legend_spread_increase_add_low + } + + # Legend type bonuses + + if = { + limit = { + has_building_or_higher = warrior_lodges_03 + scope:legend.legend_type = legend_type:heroic + } + add = legend_spread_increase_add_low + } + if = { + limit = { + has_building_or_higher = warrior_lodges_05 + scope:legend.legend_type = legend_type:heroic + } + add = legend_spread_increase_add_low + } + + if = { + limit = { + faith = scope:legend.legend_owner.faith + scope:legend.legend_type = legend_type:holy + } + add = legend_spread_increase_add_very_low + } + else_if = { + limit = { + scope:legend.legend_type = legend_type:holy + faith = { + faith_hostility_level = { + target = scope:legend.legend_owner.faith + value >= faith_astray_level + } + } + } + add = legend_spread_decrease_add_medium + } + else_if = { + limit = { + scope:legend.legend_type = legend_type:holy + faith = { + faith_hostility_level = { + target = scope:legend.legend_owner.faith + value > faith_astray_level + } + } + } + add = legend_spread_decrease_add_high + } + + if = { + limit = { + scope:legend.legend_type = legend_type:legitimizing + OR = { + county.holder.dynasty = scope:legend.legend_owner.dynasty + county.holder.top_liege.dynasty = scope:legend.legend_owner.dynasty + } + } + add = legend_spread_increase_add_very_low + } + else_if = { + limit = { + scope:legend.legend_type = legend_type:legitimizing + } + add = legend_spread_decrease_add_low + } + + + #Terrain + if = { + limit = { + OR = { + terrain = hills + terrain = drylands + terrain = forest + terrain = floodplains + terrain = wetlands + } + } + add = legend_spread_decrease_add_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = legend_spread_decrease_add_medium + } + else_if = { + limit = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = legend_spread_decrease_add_high + } + #Island? + if = { + limit = { + geographical_region = divergence_island_regions + } + add = legend_spread_decrease_add_medium + } + + #prestige levels + + if = { + limit = { + scope:legend = { + legend_owner = { + prestige_level > 4 + } + } + } + add = legend_spread_increase_add_low + } + else_if = { + limit = { + scope:legend = { + legend_owner = { + prestige_level > 3 + } + } + } + add = legend_spread_increase_add_very_low + } + + if = { + limit = { + scope:legend = { + any_legend_promoter = { + prestige_level > 4 + } + } + } + add = legend_spread_increase_add_low + } + + + #Less patchy + if = { + limit = { + county = { + any_county_province = { + any_province_legend = { + this = scope:legend + } + } + } + } + add = legend_spread_increase_add_very_low + } + + + #Is this in your realm? + if = { + limit = { county.holder = scope:legend.legend_owner } + add = legend_spread_increase_add_very_high + } + else_if = { + limit = { + scope:legend = { + any_legend_promoter = { + root.county.holder = this + } + } + } + add = legend_spread_increase_add_high + } + else_if = { + limit = { county.holder.top_liege = scope:legend.legend_owner } + add = legend_spread_increase_add_medium + } + else_if = { + limit = { + scope:legend = { + any_legend_promoter = { + root.county.holder.top_liege = this + } + } + } + add = legend_spread_increase_add_low + } + else = { + add = legend_spread_decrease_add_low + } + + #Languages + + if = { + limit = { + culture = { has_same_culture_language = scope:legend.legend_owner.culture } + } + add = legend_spread_increase_add_low + } + else_if = { + limit = { + county.holder = { knows_language_of_culture = scope:legend.legend_owner.culture } + } + add = legend_spread_increase_add_very_low + } + else_if = { + limit = { + scope:legend.legend_owner = { + has_royal_court = yes + has_dlc_feature = royal_court + } + county.holder = { knows_court_language_of = scope:legend.legend_owner } + } + add = legend_spread_increase_add_very_low + } + else_if = { + limit = { + scope:legend = { + any_legend_promoter = { + this.culture = { has_same_culture_language = root.culture } + } + } + } + add = legend_spread_increase_add_miniscule + } + else_if = { + limit = { + culture = { has_same_culture_heritage = scope:legend.legend_owner.culture } + } + add = legend_spread_increase_add_miniscule + } + else_if = { + limit = { + scope:legend.legend_owner = { + has_royal_court = yes + has_dlc_feature = royal_court + } + OR = { + county.holder.top_liege = { + has_royal_court = yes + has_same_court_language = scope:legend.legend_owner + } + county.holder = { + has_royal_court = yes + has_same_court_language = scope:legend.legend_owner + } + } + } + add = legend_spread_decrease_add_very_low + } + else_if = { + limit = { + culture = { + cultural_acceptance = { target = scope:legend.legend_owner.culture value > 40 } + } + } + add = legend_spread_decrease_add_low + } + else_if = { + limit = { + culture = { + cultural_acceptance = { target = scope:legend.legend_owner.culture value > 20 } + } + } + add = legend_spread_decrease_add_medium + } + else_if = { + limit = { + scope:legend = { + any_legend_promoter = { + this.culture = { + cultural_acceptance = { target = root.culture value > 40 } + } + } + } + } + add = legend_spread_decrease_add_medium + } + else = { + add = legend_spread_decrease_add_high + } + + #County holder opinion of legend owner + + if = { + limit = { + OR = { + OR = { + county.holder = { has_any_good_relationship_with_character_trigger = { CHARACTER = scope:legend.legend_owner } } + } + } + } + add = legend_spread_increase_add_medium + } + else_if = { + limit = { + OR = { + county.holder = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:legend.legend_owner } } + } + } + add = legend_spread_decrease_add_high + } + else_if = { + limit = { + scope:legend = { + any_legend_promoter = { + this = { has_any_good_relationship_with_character_trigger = { CHARACTER = root.county.holder } } + } + } + } + add = legend_spread_increase_add_high + } + else = { + add = legend_spread_decrease_add_low + } + + #Coastal Statistics Squash + if = { + limit = { + OR = { + is_coastal = yes + is_riverside_province = yes + } + NOR = { + county = { + any_county_province = { + any_province_legend = { + this = scope:legend + } + } + } + culture = { has_same_culture_language = scope:legend.legend_owner.culture } + } + } + add = legend_spread_decrease_add_high + } +} + +spread_chance_legends_mult_value = { + #NO ADD AFTER THIS POINT + #NO ADD ONLY MULT + value = 1 + min = 0.001 + + #Coastal Statistics Squash + if = { + limit = { + OR = { + is_coastal = yes + is_riverside_province = yes + } + NOR = { + county = { + any_county_province = { + any_province_legend = { + this = scope:legend + } + } + } + } + } + add = legend_spread_decrease_mult_high + } + + #Is this in your realm? + if = { + limit = { + county.holder = scope:legend.legend_owner + } + add = legend_spread_increase_mult_medium + } + else_if = { + limit = { + OR = { + county.holder.top_liege = scope:legend.legend_owner + scope:legend = { + any_legend_promoter = { + OR = { + root.county.holder = this + root.county.holder.top_liege = this + } + } + } + } + } + add = legend_spread_increase_mult_low + } + else = { + add = legend_spread_decrease_mult_medium + } + + #Cultural Traditions + if = { + limit = { + county.culture = { + OR = { + has_cultural_tradition = tradition_chanson_de_geste + has_cultural_tradition = tradition_fp1_northern_stories + has_cultural_tradition = tradition_storytellers + has_cultural_tradition = tradition_poetry + } + } + } + add = legend_spread_increase_mult_medium + } + else_if = { + limit = { + county.culture = { + OR = { + has_cultural_tradition = tradition_esteemed_hospitality + has_cultural_tradition = tradition_horse_lords + has_cultural_tradition = tradition_caravaneers + has_cultural_tradition = tradition_seafaring + has_cultural_tradition = tradition_city_keepers + has_cultural_tradition = tradition_maritime_mercantilism + } + } + } + add = legend_spread_increase_mult_low + } + else_if = { + limit = { + county.culture = { + OR = { + has_cultural_tradition = tradition_practiced_pirates + has_cultural_tradition = tradition_parochialism + } + } + } + add = legend_spread_increase_mult_low + } + + #Development + if = { + limit = { + county.development_level >= good_development_level + } + add = legend_spread_decrease_mult_medium + } + else_if = { + limit = { + county.development_level >= medium_development_level + } + add = legend_spread_decrease_mult_low + } + + #County holder and top liege opinion of legend owner + if = { + limit = { #slight mult increase for owner and promoter domain + OR = { + county.holder = scope:legend.legend_owner + county.holder = { promoted_legend ?= scope:legend } + } + } + add = legend_spread_increase_mult_medium + } + else_if = { + limit = { + OR = { + county.holder.top_liege = { has_any_good_relationship_with_character_trigger = { CHARACTER = scope:legend.legend_owner } } + county.holder = { has_any_good_relationship_with_character_trigger = { CHARACTER = scope:legend.legend_owner } } + } + } + add = legend_spread_increase_mult_low + } + else_if = { + limit = { + OR = { + county.holder.top_liege = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:legend.legend_owner } } + county.holder = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:legend.legend_owner } } + } + } + add = legend_spread_decrease_mult_high + } + else = { + add = legend_spread_decrease_mult_low + } + + # Game rules + if = { + limit = { + has_game_rule = legend_spread_chance_high + } + add = legend_spread_increase_mult_low + } + else_if = { + limit = { + has_game_rule = legend_spread_chance_very_high + } + add = legend_spread_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = legend_spread_chance_low + } + add = legend_spread_decrease_mult_low + } + else_if = { + limit = { + has_game_rule = legend_spread_chance_very_low + } + add = legend_spread_decrease_mult_medium + } +} + +### GOLD COSTS ### + +legend_base_cost_value = { + value = 200 +} + +legend_base_cost = { + value = legend_base_cost_value + #Scale by tier + multiply = { + value = root.primary_title.tier + subtract = 1 + multiply = 0.5 + min = 1 + } + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + } + multiply = 0.8 + } + #Scale by era + add = { + value = legend_base_cost_value + multiply = legend_cost_scale_by_era + subtract = legend_base_cost_value + desc = legend_cost_scale_by_era_desc + } + #Legends Dynasty Track discounts + add = legend_cost_dynasty_discounts + + # Game rules + if = { + limit = { + has_game_rule = legend_cost_high + } + multiply = 2 + } + else_if = { + limit = { + has_game_rule = legend_cost_very_high + } + multiply = 4 + } + else_if = { + limit = { + has_game_rule = legend_cost_low + } + divide = 2 + } + else_if = { + limit = { + has_game_rule = legend_cost_very_low + } + divide = 4 + } +} + +legend_cost_scale_by_era = { + value = 0 + if = { + limit = { + exists = culture + } + culture = { + if = { + limit = { + has_cultural_era_or_later = culture_era_late_medieval + } + add = 1.6 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_high_medieval + } + add = 1.4 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_early_medieval + } + add = 1.2 + } + else = { + add = 1 + } + } + } +} + +legend_cost_dynasty_discounts = { + if = { + limit = { + dynasty ?= { + ce1_heroic_track_perks >= 4 + } + } + multiply = 0.75 + } + else_if = { + limit = { + dynasty ?= { + ce1_heroic_track_perks >= 3 + } + } + multiply = 0.85 + } +} + +legend_upgrade_cost = { + value = legend_base_cost #includes scaling by era, tier and game rules + multiply = 0.8 + if = { + limit = { + promoted_legend ?= { has_variable = legend_quality_progress } + } + subtract = { + #Legend costs until now + value = legend_base_cost + multiply = 0.6 + #We give you 50% discount max based on your progress + multiply = { + value = promoted_legend.var:legend_quality_progress + divide = 200 + } + } + } +} + +legend_era_cost = { + value = monthly_character_income + multiply = legend_cost_scale_by_era + subtract = monthly_character_income + desc = legend_cost_scale_by_era_desc +} + +legend_game_rule_multiplier = { + value = 1 + + # Game rules + if = { + limit = { + has_game_rule = legend_cost_high + } + value = 2 + } + else_if = { + limit = { + has_game_rule = legend_cost_very_high + } + value = 4 + } + else_if = { + limit = { + has_game_rule = legend_cost_low + } + value = 0.5 + } + else_if = { + limit = { + has_game_rule = legend_cost_very_low + } + value = 0.25 + } +} + +famed_legend_owner_cost = { + value = monthly_character_income + multiply = 0.1 + min = 3 + add = 1 + multiply = legend_cost_scale_by_era + multiply = legend_game_rule_multiplier + max = 300 +} + +illustrious_legend_owner_cost = { + value = monthly_character_income + multiply = 0.15 + min = 4.5 + add = 2 + multiply = legend_cost_scale_by_era + multiply = legend_game_rule_multiplier + max = 450 +} + +mythical_legend_owner_cost = { + value = monthly_character_income + multiply = 0.25 + min = 8 + add = 4 + multiply = legend_cost_scale_by_era + multiply = legend_game_rule_multiplier + max = 800 +} + +# Promoter costs + +famed_legend_promoter_cost = { + value = monthly_character_income + multiply = 0.05 + add = 0.5 + multiply = legend_cost_scale_by_era + multiply = legend_game_rule_multiplier +} + +illustrious_legend_promoter_cost = { + value = monthly_character_income + multiply = 0.1 + add = 1 + multiply = legend_cost_scale_by_era + multiply = legend_game_rule_multiplier +} + +mythical_legend_promoter_cost = { + value = monthly_character_income + multiply = 0.2 + add = 1.5 + multiply = legend_cost_scale_by_era + multiply = legend_game_rule_multiplier +} + +# We want higher AI income than cost when starting promoting, so we do not toggle start/stop promoting too much, or spend all their income on it + +ai_famed_legend_promoter_start_required_income = { + value = famed_legend_promoter_cost + multiply = 1.4 +} + +ai_illustrious_legend_promoter_start_required_income = { + value = illustrious_legend_promoter_cost + multiply = 1.4 +} + +ai_mythical_legend_promoter_start_required_income = { + value = mythical_legend_promoter_cost + multiply = 1.4 +} + +### Prestige costs ### + +legend_prestige_cost = { + value = 200 + #Scale by tier + multiply = { + value = root.primary_title.tier + subtract = 1 + multiply = 0.5 + min = 1 + } + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + } + multiply = 0.8 + } + #Scale by era + add = { + value = legend_base_cost_value + multiply = legend_cost_scale_by_era + subtract = legend_base_cost_value + desc = legend_cost_scale_by_era_desc + } + + # Game rules + if = { + limit = { + has_game_rule = legend_cost_high + } + multiply = 2 + } + else_if = { + limit = { + has_game_rule = legend_cost_very_high + } + multiply = 4 + } + else_if = { + limit = { + has_game_rule = legend_cost_low + } + divide = 2 + } + else_if = { + limit = { + has_game_rule = legend_cost_very_low + } + divide = 4 + } +} + +### Piety costs ### + +legend_piety_cost = { + value = 200 + #Scale by tier + multiply = { + value = root.primary_title.tier + subtract = 1 + multiply = 0.5 + min = 1 + } + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + } + multiply = 0.8 + } + #Scale by era + add = { + value = legend_base_cost_value + multiply = legend_cost_scale_by_era + subtract = legend_base_cost_value + desc = legend_cost_scale_by_era_desc + } + + # Game rules + if = { + limit = { + has_game_rule = legend_cost_high + } + multiply = 2 + } + else_if = { + limit = { + has_game_rule = legend_cost_very_high + } + multiply = 4 + } + else_if = { + limit = { + has_game_rule = legend_cost_low + } + divide = 2 + } + else_if = { + limit = { + has_game_rule = legend_cost_very_low + } + divide = 4 + } +} + +### COURT POSITION TASKS ### + +monthly_court_position_task_cost_value = { + value = 0.1 +} + +monthly_court_position_task_cost = { + value = monthly_court_position_task_cost_value + #Scale by tier + multiply = { + value = scope:liege.primary_title.tier + subtract = 1 + min = 1 + } + #Scale by era + add = { + value = monthly_court_position_task_cost_value + multiply = legend_cost_scale_by_era + subtract = monthly_court_position_task_cost_value + desc = legend_cost_scale_by_era_desc + } +} + +monthly_court_position_task_cost_double = { + value = monthly_court_position_task_cost + multiply = 2 +} + +### DYNAMIC VALUES ### +legend_piety_gain = { + value = 0 + if = { + limit = { root = { legend_quality = famed } } + value = minor_piety_gain + } + else_if = { + limit = { root = { legend_quality = illustrious } } + value = medium_piety_gain + } + else = { #mythical + value = major_piety_gain + } +} + +legend_prestige_gain = { + value = 0 + if = { + limit = { root = { legend_quality = famed } } + value = minor_prestige_gain + } + else_if = { + limit = { root = { legend_quality = illustrious } } + value = medium_prestige_gain + } + else = { #mythical + value = major_prestige_gain + } +} + +legend_dynasty_prestige_gain = { + value = 0 + if = { + limit = { root = { legend_quality = famed } } + value = miniscule_dynasty_prestige_gain + } + else_if = { + limit = { root = { legend_quality = illustrious } } + value = minor_dynasty_prestige_gain + } + else = { #mythical + value = major_dynasty_prestige_gain + } +} + +major_legend_quality_increase = 50 +medium_legend_quality_increase = 20 +minor_legend_quality_increase = 10 +minor_legend_quality_decrease = { + value = 0 + subtract = minor_legend_quality_increase +} +medium_legend_quality_decrease = { + value = 0 + subtract = medium_legend_quality_increase +} +major_legend_quality_decrease = { + value = 0 + subtract = major_legend_quality_increase +} + +base_legend_create_ai = { + value = 10 + + add = { + value = ai_greed + multiply = -1 + } + + if = { + limit = { + highest_held_title_tier <= tier_duchy + } + add = -10 + } + + if = { + limit = { + monthly_character_income < mythical_legend_owner_cost + } + multiply = 0.2 + } + if = { + limit = { + monthly_character_income <= monthly_character_expenses + } + multiply = 0 + } + if = { + limit = { + has_trait = arrogant + } + multiply = 2 + } + if = { + limit = { + has_trait = ambitious + } + multiply = 2 + } + + #you need to be this rich to create legends + if = { + limit = { + OR = { + is_at_war = yes + monthly_character_income < illustrious_legend_owner_cost + } + } + value = 0 + } + if = { + limit = { + ai_has_conqueror_personality = yes + gold < 2500 + } + multiply = 0 + } + if = { + limit = { + ai_should_focus_on_building_in_their_capital = yes + } + multiply = 0 + } +} + +heroic_legend_create_ai = { + value = base_legend_create_ai + add = ai_honor + if = { + limit = { + ai_has_warlike_personality = yes + } + multiply = 2 + } + if = { + limit = { + ai_has_cautious_personality = yes + } + multiply = 0.1 + } + if = { + limit = { + ai_has_economical_boom_personality = yes + } + multiply = 0.75 + } + if = { + limit = { + ai_has_conqueror_personality = yes + gold < 2500 + } + multiply = 0 + } + if = { + limit = { + ai_should_focus_on_building_in_their_capital = yes + } + multiply = 0 + } +} + +holy_legend_create_ai = { + value = base_legend_create_ai + add = ai_zeal + if = { + limit = { + ai_has_warlike_personality = yes + } + multiply = 1.1 + } + if = { + limit = { + ai_has_cautious_personality = yes + } + multiply = 0.9 + } + if = { + limit = { + ai_has_economical_boom_personality = yes + } + multiply = 0.75 + } + if = { + limit = { + ai_has_conqueror_personality = yes + gold < 2500 + } + multiply = 0 + } + if = { + limit = { + ai_should_focus_on_building_in_their_capital = yes + } + multiply = 0 + } +} + +legitimizing_legend_create_ai = { + value = base_legend_create_ai + add = ai_rationality + if = { + limit = { + ai_has_warlike_personality = yes + } + multiply = 1.1 + } + if = { + limit = { + ai_has_cautious_personality = yes + } + multiply = 0.1 + } + if = { + limit = { + ai_has_economical_boom_personality = yes + } + multiply = 0.9 + } + if = { + limit = { + ai_has_conqueror_personality = yes + gold < 2500 + } + multiply = 0 + } + if = { + limit = { + ai_should_focus_on_building_in_their_capital = yes + } + multiply = 0 + } +} + +illustrious_legend_create_ai = { + add = 25 + if = { + limit = { + monthly_character_income < illustrious_legend_promoter_cost + } + value = 0 + } +} + +mythical_legend_create_ai = { + add = 50 + if = { + limit = { + monthly_character_income < mythical_legend_promoter_cost + } + value = 0 + } +} + + +base_legend_promote_ai = { + value = 0 + if = { + limit = { + has_any_best_good_relationship_with_character_trigger = { CHARACTER = scope:legend.legend_owner } + } + add = 20 + } + else_if = { + limit = { + has_friendly_relationship_with_character_trigger = { CHARACTER = scope:legend.legend_owner } + } + add = 8 + } + else_if = { + limit = { + likes_character_trigger = { CHARACTER = scope:legend.legend_owner } + } + add = 2 + } + if = { + limit = { + culture = { + OR = { + has_cultural_tradition = tradition_chanson_de_geste + has_cultural_tradition = tradition_fp1_northern_stories + has_cultural_tradition = tradition_storytellers + has_cultural_tradition = tradition_poetry + } + } + } + add = 2 + } + if = { # The protag is my relative + limit = { + is_close_or_extended_family_of = scope:legend.legend_owner + } + add = 2 + } + + if = { + limit = { + has_trait = arrogant # I want to create my own legend >:( + } + add = -4 + } + if = { + limit = { + has_trait = cynical + } + add = -4 + } + + if = { + limit = { + is_independent_ruler = no + } + add = -4 + } + + add = { + value = "opinion(scope:legend.legend_owner)" + multiply = 0.05 + } + + if = { + limit = { + any_character_to_title_neighboring_county = { + any_county_province = { + any_province_legend = { + this = scope:legend + } + } + } + } + add = 2 + } + else = { + add = -8 + } + + if = { #no free meals + limit = { + primary_title.tier = tier_empire + } + add = -16 + } + else_if = { + limit = { + primary_title.tier = tier_kingdom + } + add = -8 + } + else_if = { #you need to be this tall to promote legends + limit = { + primary_title.tier < tier_duchy + } + value = 0 + } + + if = { + limit = { + scope:legend = { + legend_quality = illustrious + } + } + multiply = 1.2 + } + else_if = { + limit = { + scope:legend = { + legend_quality = mythical + } + } + multiply = 1.4 + } + + if = { + limit = { + OR = { + # War is no time for idle spending + is_at_war = yes + + # Opt out if we do not have enough income to promote this legend + # (only for legends we're not currently promoting - stopping the currently promoting legend is handled by code) + AND = { + NOT = { promoted_legend ?= scope:legend } + OR = { + AND = { + scope:legend = { + legend_quality = famed + } + monthly_character_income < ai_famed_legend_promoter_start_required_income + } + AND = { + scope:legend = { + legend_quality = illustrious + } + monthly_character_income < ai_illustrious_legend_promoter_start_required_income + } + AND = { + scope:legend = { + legend_quality = mythical + } + monthly_character_income < ai_mythical_legend_promoter_start_required_income + } + } + } + } + } + value = 0 + } + #to prevent AI switching promoters too often + if = { + limit = { + exists = promoted_legend + } + multiply = 0.4 + } + if = { + limit = { + ai_has_conqueror_personality = yes + gold < 2500 + } + multiply = 0 + } + if = { + limit = { + ai_should_focus_on_building_in_their_capital = yes + } + multiply = 0 + } +} + +base_legend_complete_ai = { + value = 0 + if = { # I cannot afford the current levels monthly cost anymore + limit = { + scope:can_afford_current_level = no + } + add = 100 + } + if = { # My legend is done + limit = { + scope:legend = { legend_quality = mythical } + } + add = 100 + } + if = { # This legend is going nowhere :( + limit = { + current_year >= { + value = scope:legend.legend_start_date + add = 100 + } + } + add = 10 + } + if = { + limit = { + current_year >= { + value = scope:legend.legend_start_date + add = 200 + } + } + add = 20 + } + if = { + limit = { + scope:legend = { + any_spread_province > { count = 350 } + } + } + add = 40 + } + if = { + limit = { + monthly_character_income <= monthly_character_expenses + debt_level = 2 #Is one year in debt. + } + add = 10 + } + else_if = { + limit = { + monthly_character_income <= monthly_character_expenses + debt_level > 2 # Is two years in debt. + } + add = 25 + } + if = { + limit = { + debt_level = 5 # Is four years in debt + } + add = 40 + } +} + +base_chronicler_promote_legend_realm_cost = { + value = 0 + if = { + limit = { + scope:liege = { + promoted_legend ?= { + legend_owner = scope:liege + } + } + } + add = scope:liege.famed_legend_owner_cost + } + else = { + add = scope:liege.famed_legend_promoter_cost + } + multiply = 0.8 +} diff --git a/common/script_values/07_ep3_values.txt b/common/script_values/07_ep3_values.txt new file mode 100644 index 00000000..346e5c34 --- /dev/null +++ b/common/script_values/07_ep3_values.txt @@ -0,0 +1,5400 @@ +# INFLUENCE + +#Note! These are base values, use loss/gain below +miniscule_influence_value = 10 +minor_influence_value = 30 +medium_influence_value = 60 +major_influence_value = 100 +massive_influence_value = 150 +monumental_influence_value = 250 + + +miniscule_influence_loss = { + value = 0 + subtract = miniscule_influence_value +} +minor_influence_loss = { + value = 0 + subtract = minor_influence_value +} +medium_influence_loss = { + value = 0 + subtract = medium_influence_value +} +major_influence_loss = { + value = 0 + subtract = major_influence_value +} +massive_influence_loss = { + value = 0 + subtract = massive_influence_value +} +monumental_influence_loss = { + value = 0 + subtract = monumental_influence_value +} + +miniscule_influence_gain = miniscule_influence_value +minor_influence_gain = minor_influence_value +medium_influence_gain = medium_influence_value +major_influence_gain = major_influence_value +massive_influence_gain = massive_influence_value +monumental_influence_gain = monumental_influence_value + +#Influence Levels +low_negative_influence_level = -1 +low_influence_level = 1 +medium_influence_level = 2 +high_influence_level = 3 +very_high_influence_level = 4 +max_influence_level = 5 + +max_dynasty_influence_level = 10 +high_dynasty_influence_level = 7 +medium_dynasty_influence_level = 4 +low_dynasty_influence_level = 2 +min_dynasty_influence_level = 0 + + +influence_modifier_scaling_value = { + value = influence_level + min = 1 + desc = MODIFIER_DEFINITION_MAIN_DESC_INFLUENCE_LEVEL +} + +### Estate buidling cost values +# Base costs +estate_external_building_normal_base_cost_value = 100 +estate_external_building_high_base_cost_value = 150 +estate_internal_building_normal_base_cost_value = 50 +estate_internal_building_high_base_cost_value = 75 + +# External building costs - normal +estate_external_building_normal_cost_tier_1_value = { + value = estate_external_building_normal_base_cost_value + multiply = estate_location_cost_modifier_value +} +estate_external_building_normal_cost_tier_2_value = { + value = { + value = estate_external_building_normal_base_cost_value + multiply = 2 + } + multiply = estate_location_cost_modifier_value +} +estate_external_building_normal_cost_tier_3_value = { + value = { + value = estate_external_building_normal_base_cost_value + multiply = 3 + } + multiply = estate_location_cost_modifier_value +} +estate_external_building_normal_cost_tier_4_value = { + value = { + value = estate_external_building_normal_base_cost_value + multiply = 4 + } + multiply = estate_location_cost_modifier_value +} +estate_external_building_normal_cost_tier_5_value = { + value = { + value = estate_external_building_normal_base_cost_value + multiply = 5 + } + multiply = estate_location_cost_modifier_value +} +estate_external_building_normal_cost_tier_6_value = { + value = { + value = estate_external_building_normal_base_cost_value + multiply = 6 + } + multiply = estate_location_cost_modifier_value +} + +# External building costs - high +estate_external_building_high_cost_tier_1_value = { + value = estate_external_building_high_base_cost_value + multiply = estate_location_cost_modifier_value +} +estate_external_building_high_cost_tier_2_value = { + value = { + value = estate_external_building_high_base_cost_value + multiply = 2 + } + multiply = estate_location_cost_modifier_value +} +estate_external_building_high_cost_tier_3_value = { + value = { + value = estate_external_building_high_base_cost_value + multiply = 3 + } + multiply = estate_location_cost_modifier_value +} +estate_external_building_high_cost_tier_4_value = { + value = { + value = estate_external_building_high_base_cost_value + multiply = 4 + } + multiply = estate_location_cost_modifier_value +} +estate_external_building_high_cost_tier_5_value = { + value = { + value = estate_external_building_high_base_cost_value + multiply = 5 + } + multiply = estate_location_cost_modifier_value +} +estate_external_building_high_cost_tier_6_value = { + value = { + value = estate_external_building_high_base_cost_value + multiply = 6 + } + multiply = estate_location_cost_modifier_value +} + +# Internal building costs - normal +estate_internal_building_normal_cost_tier_1_value = { + value = estate_internal_building_normal_base_cost_value + multiply = estate_location_cost_modifier_value +} +estate_internal_building_normal_cost_tier_2_value = { + value = { + value = estate_internal_building_normal_base_cost_value + multiply = 2 + } + multiply = estate_location_cost_modifier_value +} +estate_internal_building_normal_cost_tier_3_value = { + value = { + value = estate_internal_building_normal_base_cost_value + multiply = 3 + } + multiply = estate_location_cost_modifier_value +} +estate_internal_building_normal_cost_tier_4_value = { + value = { + value = estate_internal_building_normal_base_cost_value + multiply = 4 + } + multiply = estate_location_cost_modifier_value +} +estate_internal_building_normal_cost_tier_5_value = { + value = { + value = estate_internal_building_normal_base_cost_value + multiply = 5 + } + multiply = estate_location_cost_modifier_value +} +estate_internal_building_normal_cost_tier_6_value = { + value = { + value = estate_internal_building_normal_base_cost_value + multiply = 6 + } + multiply = estate_location_cost_modifier_value +} + +# Internal building costs - high +estate_internal_building_high_cost_tier_1_value = { + value = estate_internal_building_high_base_cost_value + multiply = estate_location_cost_modifier_value +} +estate_internal_building_high_cost_tier_2_value = { + value = { + value = estate_internal_building_high_base_cost_value + multiply = 2 + } + multiply = estate_location_cost_modifier_value +} +estate_internal_building_high_cost_tier_3_value = { + value = { + value = estate_internal_building_high_base_cost_value + multiply = 3 + } + multiply = estate_location_cost_modifier_value +} +estate_internal_building_high_cost_tier_4_value = { + value = { + value = estate_internal_building_high_base_cost_value + multiply = 4 + } + multiply = estate_location_cost_modifier_value +} +estate_internal_building_high_cost_tier_5_value = { + value = { + value = estate_internal_building_high_base_cost_value + multiply = 5 + } + multiply = estate_location_cost_modifier_value +} +estate_internal_building_high_cost_tier_6_value = { + value = { + value = estate_internal_building_high_base_cost_value + multiply = 6 + } + multiply = estate_location_cost_modifier_value +} + +# Estate location modifier value +estate_location_cost_modifier_value = { + value = 1 + + if = { # Everything is a bit more expensive in the capital + limit = { + domicile.domicile_location = top_liege.capital_province + } + add = 0.2 + } + else_if = { # Everything is a bit cheaper in themes along the borders + limit = { + any_top_realm_border_county = { + duchy = root.domicile.domicile_location.county.duchy + } + } + add = -0.2 + } +} + +### Estate building AI values +estate_building_ai_modifier_value = { + if = { + limit = { # Some characters should want to build in their estate before they construct buildings in holdings + scope:owner = { + OR = { + has_trait = arbitrary + has_trait = gluttonous + has_trait = greedy + } + } + } + add = 10 + } + if = { # Character's loyal to the realm should very slightly favor constructing buildings in holdings first + limit = { + scope:owner = { + has_trait = loyal + OR = { + has_trait = diligent + has_trait = just + } + } + } + add = -1 # This will generally (though not guaranteed) make the AI build estate buildings one tier later than normal + } +} +# + +granary_modifier_scaling_value = { + value = 1 + if = { + limit = { + exists = root + } + if = { + limit = { + domicile ?= { has_domicile_building_or_higher = grain_field_01 } + } + domicile ?= { + if = { + limit = { has_domicile_building = grain_field_06 } + add = 6 + } + else_if = { + limit = { has_domicile_building = grain_field_05 } + add = 5 + } + else_if = { + limit = { has_domicile_building = grain_field_04 } + add = 4 + } + else_if = { + limit = { has_domicile_building = grain_field_03 } + add = 3 + } + else_if = { + limit = { has_domicile_building = grain_field_02 } + add = 2 + } + else = { + add = 1 + } + } + } + if = { + limit = { + domicile ?= { + domicile_location = { + this = root.top_liege.capital_province + } + } + } + add = 2 + } + if = { + limit = { + domicile ?= { + domicile_location = { + OR = { + terrain = farmlands + terrain = floodplains + } + } + } + } + add = 5 + } + if = { + limit = { + domicile ?= { + domicile_location.county = { + county_control < 100 + } + } + } + add = { + value = 100 + subtract = domicile.domicile_location.county.county_control + multiply = 0.1 + round = yes + min = 1 + } + } + if = { + limit = { + domicile ?= { + domicile_location.county = { + development_level >= estate_granary_development_bonus_2_value + } + } + } + multiply = 3 + } + else_if = { + limit = { + domicile ?= { + domicile_location.county = { + development_level >= estate_granary_development_bonus_1_value + } + } + } + multiply = 2 + } + if = { + limit = { + domicile ?= { + domicile_location = { + any_province_epidemic = { count >= 1 } + } + } + } + multiply = 2 + } + } + desc = MODIFIER_DEFINITION_ESTATE_SCALING_DESC +} +estate_granary_development_bonus_1_value = 30 +estate_granary_development_bonus_2_value = 60 + +estate_construction_influence_gain_value = { + value = 20 + + # Bonus from governing with Civilian Administration + if = { + limit = { vassal_contract_has_flag = admin_influence_construction_bonus } + add = 20 + } + + # Increase from Estate Building + if = { + limit = { + domicile ?= { has_domicile_parameter = estate_increase_influence_on_building_construction_5 } + } + multiply = { + value = 1 + add = estate_construction_influence_bonus_5_value + } + } + else_if = { + limit = { + domicile ?= { has_domicile_parameter = estate_increase_influence_on_building_construction_4 } + } + multiply = { + value = 1 + add = estate_construction_influence_bonus_4_value + } + } + else_if = { + limit = { + domicile ?= { has_domicile_parameter = estate_increase_influence_on_building_construction_3 } + } + multiply = { + value = 1 + add = estate_construction_influence_bonus_3_value + } + } + else_if = { + limit = { + domicile ?= { has_domicile_parameter = estate_increase_influence_on_building_construction_2 } + } + multiply = { + value = 1 + add = estate_construction_influence_bonus_2_value + } + } + else_if = { + limit = { + domicile ?= { has_domicile_parameter = estate_increase_influence_on_building_construction_1 } + } + multiply = { + value = 1 + add = estate_construction_influence_bonus_1_value + } + } +} +estate_construction_influence_bonus_1_value = 0.2 +estate_construction_influence_bonus_2_value = 0.4 +estate_construction_influence_bonus_3_value = 0.6 +estate_construction_influence_bonus_4_value = 0.8 +estate_construction_influence_bonus_5_value = 1 + +influence_inherit_large_bonus_value = 0.3 +influence_inherit_medium_bonus_value = 0.2 +influence_inherit_small_bonus_value = 0.1 + +appointment_score_script_value = { + value = "appointment_candidate_score(root.primary_title)" + min = 1 + desc = APPOINTMENT_SCORE_SCRIPT_VALUE_DESC +} + +# The cost for taking command of other theme troops - ROOT is the title the requested troops belong to +admin_title_troop_command_cost_value = { + save_temporary_scope_as = recipient_title + + # Base cost - Set in 00_defines.txt + value = { + value = define:NAdministrative|BASE_REASSIGN_COST + format = "BASE_VALUE_FORMAT" + desc = "BASE_VALUE" + } + + if = { # Increase cost based on the total number of regiments - The first three regiments are not accounted for, we consider them a part of the base cost + limit = { + scope:recipient_title = { + OR = { + any_owned_title_maa_regiment = { + count > 3 + } + any_owned_title_maa_regiment = { + maa_size > 3 + } + AND = { + any_owned_title_maa_regiment = { + count > 2 + } + any_owned_title_maa_regiment = { + maa_size > 1 + } + } + AND = { + any_owned_title_maa_regiment = { + count > 1 + } + any_owned_title_maa_regiment = { + maa_size > 2 + } + } + } + } + } + add = { + value = define:NAdministrative|BASE_REASSIGN_COST + multiply = { + value = { + scope:recipient_title = { + every_title_maa_regiment = { + add = maa_size + } + } + subtract = 3 + divide = 20 + } + } + desc = ADMIN_TITLE_TROOP_COST_ARMY_SIZE_DESC + } + } + + # You are fighting a defensive war + if = { + limit = { + scope:actor = { + any_character_war = { + is_war_leader = scope:actor + is_defender = scope:actor + } + } + } + subtract = { + value = define:NAdministrative|BASE_REASSIGN_COST + multiply = 0.25 + desc = ADMIN_TITLE_TROOP_COST_DEFENDER_DESC + } + } + # You are fighting an offensive war, and the troop owner is far away + else_if = { + limit = { + scope:recipient_title.holder = { is_independent_ruler = no } + scope:actor = { + any_war_enemy = { + realm_to_title_distance_squared = { + title = scope:recipient_title + value > 100000 + } + } + } + } + add = { + value = define:NAdministrative|BASE_REASSIGN_COST + multiply = 0.25 + desc = ADMIN_TITLE_TROOP_COST_ATTACKER_DESC + } + } + + # The Troop owner is inside the war goal + if = { + limit = { + holder = { + target_is_liege_or_above = scope:actor + OR = { + any_held_title = { is_contested = yes } + any_vassal = { + any_held_title = { is_contested = yes } + } + } + } + } + subtract = { + value = define:NAdministrative|BASE_REASSIGN_COST + multiply = 0.25 + desc = ADMIN_TITLE_TROOP_COST_OWNER_IN_WAR_GOAL_DESC + } + } + + # If you are independent - The cost is reduced with your Imperial Bureacracy law + if = { + limit = { + scope:actor = { + is_independent_ruler = yes + has_realm_law_flag = admin_title_troop_cost_reduction_high + } + } + subtract = { + value = define:NAdministrative|BASE_REASSIGN_COST + multiply = admin_law_cost_reduction_high_value + desc = ADMIN_TITLE_TROOP_COST_LAW_2_DESC + } + } + else_if = { + limit = { + scope:actor = { + is_independent_ruler = yes + has_realm_law_flag = admin_title_troop_cost_reduction + } + } + subtract = { + value = define:NAdministrative|BASE_REASSIGN_COST + multiply = admin_law_cost_reduction_value + desc = ADMIN_TITLE_TROOP_COST_LAW_1_DESC + } + } +} +admin_law_cost_reduction_value = 0.25 +admin_law_cost_reduction_high_value = 0.5 + +admin_troops_reclaim_cost_cooldown_value = 5 + +# Some control values that we reference in loc. +diarch_more_efficient_administrative_emperor_promotion_candidate_massive_value = 1.5 +diarch_more_efficient_administrative_emperor_promotion_candidate_major_value = 1 +diarch_more_efficient_administrative_emperor_promotion_candidate_medium_value = 0.75 +diarch_more_efficient_administrative_emperor_promotion_candidate_mild_value = 0.5 + +# For use when promoting a candidate via interaction. +appointment_score_interaction_multiplier_modifiers_value = { + value = 1 + # Co-emperors are more efficient to promote. + if = { + limit = { + exists = scope:target + exists = scope:secondary_recipient + appointment_interactions_recipient_is_suitable_co_emperor_trigger = yes + } + if = { + limit = { + scope:actor.top_liege = { has_diarchy_active_parameter = diarch_more_efficient_administrative_emperor_promotion_candidate_massive } + } + add = diarch_more_efficient_administrative_emperor_promotion_candidate_massive_value + } + else_if = { + limit = { + scope:actor.top_liege = { has_diarchy_active_parameter = diarch_more_efficient_administrative_emperor_promotion_candidate_major } + } + add = diarch_more_efficient_administrative_emperor_promotion_candidate_major_value + } + else_if = { + limit = { + scope:actor.top_liege = { has_diarchy_active_parameter = diarch_more_efficient_administrative_emperor_promotion_candidate_medium } + } + add = diarch_more_efficient_administrative_emperor_promotion_candidate_medium_value + } + else_if = { + limit = { + scope:actor.top_liege = { has_diarchy_active_parameter = diarch_more_efficient_administrative_emperor_promotion_candidate_mild } + } + add = diarch_more_efficient_administrative_emperor_promotion_candidate_mild_value + } + } +} + +# State Faith +ep3_state_faith_conversion_mult_value = 2 + +# Hold Triumph Decision +ep3_triumph_gold_cost = { + value = 100 + if = { + limit = { + NOT = { government_allows = administrative } + } + add = 100 + if = { + limit = { + NOT = { + has_variable = ep3_valid_triumph_victory + } + } + add = 200 + } + } +} + +ep3_triumph_influence_cost = { + value = 0 + if = { + limit = { + government_allows = administrative + } + add = 50 + if = { + limit = { + NOT = { + has_variable = ep3_valid_triumph_victory + } + } + add = 200 + } + } +} + +# Laamp + +ep3_laamp_chance_score_value = { + value = 0 + add = { value = sum_of_all_skills_and_prowess_value divide = 4 } + add = { value = piety_level multiply = 2 } # Devotion + add = { value = prestige_level multiply = 2 } # Fame + # Age + if = { + limit = { age < 25 } + add = 3 + } + # Personality + if = { + limit = { has_trait = ambitious } + add = 3 + } + if = { + limit = { has_trait = brave } + add = 3 + } + if = { + limit = { has_trait = arrogant } + add = 3 + } + if = { + limit = { has_trait = stubborn } + add = 3 + } + # Genetics + if = { + limit = { has_trait = beauty_good } + add = 3 + } + if = { + limit = { has_trait = intellect_good } + add = 3 + } + if = { + limit = { has_trait = physique_good } + add = 3 + } + # Fame/Lifestyle/Commander + every_trait_in_category = { + category = fame + category = lifestyle + category = commander + add = 3 + } + # Education + if = { + limit = { has_trait = education_martial } + add = 5 + } + if = { + limit = { has_trait = education_martial_prowess } + add = 5 + } + # Bastardry + if = { + limit = { has_trait = bastard } + add = 5 + } + if = { + limit = { has_trait = legitimized_bastard } + add = 3 + } + if = { + limit = { has_trait = wild_oat } + add = 3 + } + if = { + limit = { has_trait = child_of_concubine } + add = 3 + } + # Cosmetics + if = { + limit = { has_trait = scarred } + add = 3 + } + if = { + limit = { has_trait = one_eyed } + add = 3 + } + if = { + limit = { has_trait = disfigured } + add = 3 + } + # Culture/Faith + if = { + limit = { + faith = { has_doctrine_parameter = unlock_voluntary_laampdom_faith } + } + add = 5 + } + if = { + limit = { + culture = { has_cultural_parameter = unlock_voluntary_laampdom } + } + add = 5 + } + if = { + limit = { + culture = { has_cultural_parameter = much_more_likely_to_be_laamps } + } + add = 50 + } + if = { + limit = { + culture = { has_cultural_parameter = more_likely_to_be_laamps } + } + add = 25 + } + # Too much to lose + every_heir_title = { + add = { + value = 0 + subtract = tier + } + } + every_held_title = { + add = { + value = tier + multiply = -2 + } + } + # Stop streaks + every_held_title = { + limit = { + previous_holder ?= { + is_alive = yes + government_has_flag = government_is_landless_adventurer + } + } + add = -75 + } + # Encourage potential legitimists and such to go wandering. + if = { + limit = { realm_size <= 0 } + every_claim = { + limit = { tier >= tier_kingdom } + add = 30 + } + } +} + +request_laamp_invasion_sponsorship_gold_cost = { + value = 300 + if = { + limit = { scope:recipient.highest_held_title_tier >= tier_empire } + add = 200 + } +} + +## Referenced in code +ep3_hire_laamp_mercs_cost_value = { + value = scope:recipient.current_military_strength + divide = 10 + min = scope:actor.minor_gold_value + multiply = { + value = { + scope:actor = { + every_character_war = { + limit = { + is_war_leader = scope:actor + } + add = 1 + } + } + } + } + if = { + limit = { + scope:recipient.domicile = { has_domicile_parameter = camp_improved_mercenary_contract_rewards } + } + multiply = camp_improved_mercenary_contract_rewards_value + } + if = { + limit = { + scope:recipient = { has_perk = hard_rule_perk } + } + multiply = adventurer_hard_rule_contract_rewards_value + } +} + +ep3_hire_laamp_mercs_payment_value = { + value = scope:war_contribution_value + divide = 10 + min = scope:employer.medium_gold_value + if = { + limit = { + scope:laamp_temp.domicile ?= { has_domicile_parameter = camp_improved_mercenary_contract_rewards } + } + multiply = camp_improved_mercenary_contract_rewards_value + } + if = { + limit = { + exists = scope:war_valuable_prisoners + } + add = { + value = scope:war_valuable_prisoners + multiply = 20 + } + } + if = { + limit = { + scope:laamp_temp ?= { has_perk = hard_rule_perk } + } + multiply = adventurer_hard_rule_contract_rewards_value + } + max = { + value = scope:employer.yearly_character_income + if = { + limit = { + scope:employer.gold > 0 + } + add = scope:employer.gold + } + } +} + +ep3_laamp_flavour_ewan_4041_regiment_damage_wildfires_min = 20 +ep3_laamp_flavour_ewan_4041_regiment_damage_wildfires_max = 50 + +ep3_laamp_flavour_ewan_4041_regiment_damage_avalanches_min = 30 +ep3_laamp_flavour_ewan_4041_regiment_damage_avalanches_max = 60 + +ep3_laamp_flavour_ewan_4041_regiment_damage_flash_floods_min = 20 +ep3_laamp_flavour_ewan_4041_regiment_damage_flash_floods_max = 40 + +ep3_laamp_flavour_ewan_4041_regiment_damage_frozen_water_min = 15 +ep3_laamp_flavour_ewan_4041_regiment_damage_frozen_water_max = 30 + +ep3_laamp_flavour_ewan_4041_regiment_damage_earthquake_min = 50 +ep3_laamp_flavour_ewan_4041_regiment_damage_earthquake_max = 80 + +chariot_race_entrance_fee = { + value = 50 +} + +chariot_ordering_value = { + value = 0 + add = aptitude:charioteer_court_position + round = yes +} + +charioteer_chance_to_win = { + value = 1 + add = prowess + add = aptitude:charioteer_court_position + round = yes +} + +charioteer_chance_to_place = { + value = 1 + add = prowess + add = aptitude:charioteer_court_position + round = yes +} + +charioteer_chance_to_show = { + value = 1 + add = prowess + add = aptitude:charioteer_court_position + round = yes +} + +charioteer_victory_score_value = { + value = 0 + if = { + limit = { is_alive = yes} + if = { + limit = { has_variable = chariot_race_victory_score } + add = var:chariot_race_victory_score + } + } +} + +charioteer_passive_phase_gui_sort_value = { + value = 1 + if = { + limit = { is_alive = yes } + add = this.aptitude:charioteer_court_position + } +} + +charioteer_placement_middle = { + value = 0 + add = { + value = involved_activity.var:num_charioteers + divide = 2 + } +} + +following_charioteer_index = { + value = var:current_place_in_race + add = 1 + max = 12 +} + +ahead_charioteer_index = { + value = var:current_place_in_race + subtract = 1 + min = 1 +} + +2_ahead_charioteer_index = { + value = var:current_place_in_race + subtract = 2 + min = 1 +} + +bookkeeper_small_commission_value = { + value = 0.2 + if = { + limit = { + scope:host.court_position:bookmaker_court_position ?= { + has_character_flag = bookmaker_cooking_the_books + } + } + multiply = 3 + } +} + +bookkeeper_medium_commission_value = { + value = 0.3 + if = { + limit = { + scope:host.court_position:bookmaker_court_position ?= { + has_character_flag = bookmaker_cooking_the_books + } + } + multiply = 3 + } +} + +bookkeeper_large_commission_value = { + value = 0.4 + if = { + limit = { + scope:host.court_position:bookmaker_court_position ?= { + has_character_flag = bookmaker_cooking_the_books + } + } + multiply = 3 + } +} + +# Distance value used instead of diplo range for LAAMP interactions range +ep3_laamp_interaction_max_range = 450000 #from Byzantion to west and east edges of ERE in 1066 + +purchase_land_county_cost_value = 400 +purchase_land_duchy_cost_value = 1000 + +ep3_laamp_invasion_levies_size_value = { + value = 0 + add = scope:supporter.max_military_strength + divide = 10 + max = { + # Standard base max. + value = varangian_adventurers_standard_levy_cap_value + } +} + +ep3_laamp_invasion_ai_targeting_value = { + value = 100 + scope:attacker = { + # Weight up claims. + if = { + limit = { + scope:attacker = { + any_claim = { + OR = { + holder = scope:defender + holder.top_liege = scope:defender + } + } + } + } + add = 100 + } + # Weight up those who are already overwhelmed. + if = { + limit = { + scope:defender = { gold < 0 } + } + add = 100 + } + # Weight up those who are already overwhelmed. + if = { + limit = { + scope:defender = { is_at_war = yes } + } + add = 100 + } + # Weight up independent dukes. + if = { + limit = { + scope:defender = { highest_held_title_tier = tier_duchy } + } + add = 100 + } + # Weight up independent kings. + if = { + limit = { + scope:defender = { highest_held_title_tier = tier_kingdom } + } + add = 50 + } + # Weight up for coastal counties. + every_in_list = { + list = target_titles + limit = { + tier = tier_county + is_coastal_county = yes + } + add = 50 + } + # Weight down independent religious heads. + if = { + limit = { scope:defender = scope:defender.faith.religious_head } + add = -1000 + } + # Weight down independent counts. + if = { + limit = { + scope:defender = { highest_held_title_tier = tier_county } + } + add = -200 + } + # Weight down small players. + if = { + limit = { + scope:defender = { + is_ai = no + realm_size <= minor_realm_size + } + } + add = -1000 + } + } +} + +ep3_laamp_invasion_cb_cost = { + add = { + if = { + limit = { + any_in_list = { + list = target_titles + tier >= tier_empire + } + } + add = 10000 + } + else_if = { + limit = { + any_in_list = { + list = target_titles + tier >= tier_kingdom + } + } + add = 5000 + } + else_if = { + limit = { + any_in_list = { + list = target_titles + tier >= tier_duchy + } + } + add = 2000 + } + else = { add = 500 } + desc = "CB_BASE_COST" + } + + # Reduce the cost to make this more feasible for the AI. + scope:attacker = { + if = { + limit = { is_ai = yes } + multiply = 0.1 + } + } + + #Halve cost if Lust for Land modifier + if = { + limit = { + scope:attacker = { + has_character_modifier = ep3_lust_for_land_modifier + } + } + divide = { + value = 2 + desc = "lust_for_land_modifier_tt" + } + } +} + +ep3_laamp_invasion_base_piety_cost = { + add = common_cb_impious_piety_cost + if = { + limit = { + scope:defender.faith = scope:attacker.faith + } + add = { + value = major_piety_value + desc = CB_SAME_FAITH_COST + } + } +} + +# Governor efficiency used in code +# root - charater that is evaluated for the governorship +# End result should be a multiplier, but we add larger values to present it better in the breakdown. E.g. we add 10, but divide it with 100 to make it 0.1. +governor_efficiency = { + value = { + # Everyone will calculate their Efficiency according to the following: + # Skills + add = { + add = { + desc = diplomacy_concept + add = { + value = diplomacy + multiply = 1.7 + } + round = yes + } + add = { + desc = martial_concept + add = { + value = martial + multiply = 1.7 + } + round = yes + } + add = { + desc = stewardship_concept + add = { + value = stewardship + multiply = 1.7 + } + round = yes + } + add = { + desc = intrigue_concept + add = { + value = intrigue + multiply = 1.7 + } + round = yes + } + add = { + desc = learning_concept + add = { + value = learning + multiply = 1.7 + } + round = yes + } + divide = 100 + } + + # Rank 4 or 5 education trait + if = { + limit = { + OR = { + has_trait = education_diplomacy_5 + has_trait = education_martial_5 + has_trait = education_stewardship_5 + has_trait = education_intrigue_5 + has_trait = education_learning_5 + } + } + add = { + add = { + value = 4 + desc = has_rank_5_education_desc + } + divide = 100 + } + } + else_if = { + limit = { + OR = { + has_trait = education_diplomacy_4 + has_trait = education_martial_4 + has_trait = education_stewardship_4 + has_trait = education_intrigue_4 + has_trait = education_learning_4 + } + } + add = { + add = { + value = 2 + desc = has_rank_4_education_desc + } + divide = 100 + } + } + + # Governor trait + if = { # You only get a small bonus since the trait also provides skills that will increase Efficiency further + limit = { + has_trait = governor + has_trait_xp = { + trait = governor + value >= 25 + } + } + add = { + add = { + value = 0 + if = { + limit = { + has_trait_xp = { + trait = governor + value >= 100 + } + } + add = 12 + } + else_if = { + limit = { + has_trait_xp = { + trait = governor + value >= 75 + } + } + add = 9 + } + else_if = { + limit = { + has_trait_xp = { + trait = governor + value >= 50 + } + } + add = 6 + } + else_if = { + limit = { + has_trait_xp = { + trait = governor + value >= 25 + } + } + add = 3 + } + desc = governor_trait_short_desc + } + divide = 100 + } + } + + # Estate + if = { + limit = { domicile ?= { has_domicile_parameter = estate_governor_efficiency_bonus } } + add = { + add = { + value = estate_governor_efficiency_bonus_value + multiply = 100 + desc = "[estate_buildings|E]" + } + divide = 100 + } + } + else_if = { + limit = { + house ?= { + house_head ?= { + domicile ?= { has_domicile_parameter = estate_governor_efficiency_bonus_for_house_members } + } + } + } + add = { + add = { + value = estate_governor_efficiency_house_bonus_value + multiply = 100 + desc = "[estate_buildings|E]" + } + divide = 100 + } + } + + # Bonuses from active Governorship Obligation/Administration + if = { + limit = { vassal_contract_has_flag = admin_martial_obligation_bonus } + add = { + add = { + value = martial + multiply = efficiency_skill_increase_value + desc = admin_martial_obligation_bonus_desc + } + divide = 100 + } + } + if = { + limit = { vassal_contract_has_flag = admin_stewardship_obligation_bonus } + add = { + add = { + value = stewardship + multiply = efficiency_skill_increase_value + desc = admin_stewardship_obligation_bonus_desc + } + divide = 100 + } + } + if = { + limit = { vassal_contract_has_flag = admin_prowess_obligation_bonus } + add = { + add = { + value = prowess + multiply = efficiency_skill_increase_value + desc = admin_prowess_obligation_bonus_desc + } + divide = 100 + } + } + if = { + limit = { vassal_contract_has_flag = admin_prestige_obligation_bonus } + add = { + add = { + value = prestige_level + multiply = efficiency_currency_level_increase_value + desc = admin_prestige_obligation_bonus_desc + } + divide = 100 + } + } + if = { + limit = { vassal_contract_has_flag = admin_tradeport_obligation_bonus } + add = { + add = { + every_sub_realm_barony = { + limit = { + title_province = { has_building_or_higher = common_tradeport_01 } + } + add = efficiency_building_increase_value + } + desc = admin_tradeport_obligation_bonus_desc + } + divide = 100 + } + } + + # Dynasty Legacy Perk + if = { + limit = { + dynasty ?= { ep3_administrative_legacy_track_perks >= 1 } + } + add = { + add = { + value = 5 + desc = "[GetDynastyPerk('ep3_administrative_legacy_1').GetName]" + } + divide = 100 + } + } + + # Lifestyle Perks + # Positions of Power Stewardship Perk + if = { + limit = { has_perk = positions_of_power_perk } + add = { + add = { + value = 5 + desc = "[GetPerk('positions_of_power_perk').GetName(GetPlayer)]" + } + divide = 100 + } + } + # Strict Organization Martial Perk + if = { + limit = { has_perk = strict_organization_perk } + add = { + add = { + value = 5 + desc = "[GetPerk('strict_organization_perk').GetName(GetPlayer)]" + } + divide = 100 + } + } + + # Events + add = { + add = { + desc = gov_efficiency_events_desc + if = { #ep3_emperor_yearly.2150 + limit = { has_character_flag = ep3_2150_found_truth } + add = 10 + } + if = { #ep3_governor_yearly.3070 + limit = { + has_character_modifier = contented_governing_countrymen_modifier + exists = capital_county + culture = capital_county.culture + } + add = 10 + } + if = { #ep3_emperor_yearly.2160 + limit = { has_character_flag = ep3_2160_success } + add = 5 + } + if = { #ep3_emperor_yearly.2160 + limit = { has_character_flag = ep3_2160_failure } + add = -5 + } + if = { #ep3_governor_yearly.3100 + limit = { has_character_modifier = ep3_ignoring_realm_decline_modifier } + add = -5 + } + if = { #ep3_governor_yearly.3080 + limit = { has_character_flag = ep3_governor_ignored_isolation } + add = -5 + } + if = { #ep3_governor_yearly.3080 + limit = { has_character_modifier = ep3_anxious_for_new_assignment_modifier } + add = -5 + } + if = { #ep3_emperor_yearly.2170 + limit = { has_character_flag = ep3_2170_success } + add = 5 + } + if = { + limit = { has_character_modifier = restored_greek_theme_modifier } + add = 10 + } + if = { #ep3_emperor_yearly.2190 + limit = { has_character_flag = ep3_2190_honest } + add = 10 + } + if = { #ep3_emperor_yearly.2200 + limit = { has_character_flag = ep3_embezzling_governor } + add = -5 + } + if = { + limit = { has_character_modifier = ep3_bolstered_governor_treasury_modifier } + add = 5 + } + if = { + limit = { has_character_modifier = ep3_governor_yearly_8050_imperial_recruiter_modifier } + add = 5 + } + if = { + limit = { has_character_flag = ep3_8060_efficiency_drop } + add = -5 + } + if = { + limit = { has_character_modifier = ep3_governor_yearly_8050_imperial_resources_modifier } + add = -5 + } + if = { + limit = { has_character_modifier = ep3_governor_yearly_8120_relief_rejected_modifier } + add = -5 + } + if = { + limit = { has_character_modifier = ep3_governor_yearly_8130_raised_taxes_modifier } + add = -5 + } + if = { + limit = { has_character_modifier = ep3_governor_yearly_8130_raised_almonage_modifier } + add = 5 + } + if = { + limit = { has_character_modifier = noble_administrators_modifier } + add = 5 + } + if = { + limit = { has_character_flag = ep3_governor_yearly_3050_neglect_duties } + add = -5 + } + if = { + limit = { has_character_flag = ep3_governor_yearly_3002_landlord_fight } + add = -5 + } + if = { + limit = { has_character_flag = ep3_governor_yearly_3002_landlord_wins } + add = -10 + } + if = { + limit = { has_character_flag = ep3_governor_yearly_3002_landlord_dominates } + add = -15 + } + if = { + limit = { has_character_modifier = ep3_governor_yearly_8040_domicile_development_modifier } + add = -10 + } + } + divide = 100 + } + + # Interactions + add = { + add = { + desc = gov_efficiency_interactions_desc + if = { + limit = { has_character_modifier = ep3_boost_efficiency_modifier } + add = { + value = { + value = efficiency_interaction_change_value + multiply = var:ep3_governor_efficiency_stack + } + } + } + if = { + limit = { has_character_modifier = ep3_damage_efficiency_modifier } + add = { + value = { + value = efficiency_interaction_change_value + multiply = -1 # Negativise + multiply = var:ep3_governor_efficiency_stack + } + } + } + } + divide = 100 + } + + # Schemes + add = { + add = { + desc = "[GetModifier('scheme_slandered_modifier').GetNameWithTooltip]" + if = { + limit = { has_character_modifier = scheme_slandered_modifier } + add = efficiency_slandered_value + } + } + divide = 100 + } + + # Eunuch + if = { + limit = { + exists = liege + liege.culture ?= { + has_cultural_parameter = eunuch_trait_bonuses + } + has_trait = eunuch_1 + } + add = { + add = { + value = 10 + desc = court_position_eunuch_trait + } + divide = 100 + } + } + else_if = { + limit = { + exists = liege + liege.culture ?= { + has_cultural_parameter = eunuch_trait_bonuses + } + has_trait = beardless_eunuch + } + add = { + add = { + value = 10 + desc = court_position_beardless_eunuch_trait + } + divide = 100 + } + } + + # Non-de jure governors get a penalty + if = { + limit = { + exists = top_liege + top_liege = { save_temporary_scope_as = top_liege_temp } + is_governor = yes + any_sub_realm_county = { + NOT = { + trigger_if = { + limit = { scope:top_liege_temp.highest_held_title_tier = tier_empire } + empire ?= scope:top_liege_temp.primary_title + } + trigger_else = { kingdom ?= scope:top_liege_temp.primary_title } + } + } + } + add = { + add = { + value = de_jure_governor_bonus + desc = de_jure_governor_desc + } + divide = 100 + } + } + min = 0.5 # Can't go lower than -50% + max = 1.5 # Can't go higher than +50% + } +} + +# Governor efficiency as presented in the interface. +governor_efficiency_presented = { + value = { + add = governor_efficiency + multiply = 100 # Make percentile + subtract = 100 # Shift calculation to be between -50% and 50% + } +} + +efficiency_skill_increase_value = 0.5 +efficiency_currency_level_increase_value = 4 +efficiency_building_increase_value = 2 +efficiency_slandered_value = -5 +admin_contract_cooldown_value = 5 + +governance_task_contract_tier_value = { + value = 1 + + if = { + limit = { + scope:task_contract.task_contract_tier >= define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER + scope:task_contract.task_contract_tier < define:NTaskContract|HIGH_TASK_CONTRACT_TIER + } + add = 0.5 + } + else_if = { + limit = { + scope:task_contract.task_contract_tier >= define:NTaskContract|HIGH_TASK_CONTRACT_TIER + } + add = 1 + } +} + +governance_modifier_scaling_tier_value = { + value = 1 + if = { + limit = { + scope:task_contract.task_contract_tier >= define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER + scope:task_contract.task_contract_tier < define:NTaskContract|HIGH_TASK_CONTRACT_TIER + } + add = 1 + } + else_if = { + limit = { + scope:task_contract.task_contract_tier >= define:NTaskContract|HIGH_TASK_CONTRACT_TIER + } + add = 2 + } + desc = MODIFIER_DEFINITION_MAIN_DESC_GOVERNANCE_TIER +} + +estate_governance_contract_bonus_value = 0.5 + +appointment_cost_multiplier_value = { + value = 1 + if = { + limit = { + top_liege = { has_realm_law = male_preference_law } + is_female = yes + } + add = 1 + } + else_if = { + limit = { + top_liege = { has_realm_law = male_only_law } + is_female = yes + } + multiply = 3 + } + else_if = { + limit = { + top_liege = { has_realm_law = female_preference_law } + is_female = no + } + multiply = 1 + } + else_if = { + limit = { + top_liege = { has_realm_law = female_only_law } + is_female = no + } + multiply = 3 + } +} + +appointment_minor_influence_cost = { + value = 50 +} + +appointment_medium_influence_cost = { + value = 100 +} + +appointment_major_influence_cost = { + value = 250 +} + +appointment_score_minor_value = { + value = appointment_minor_influence_cost + multiply = 0.2 +} + +appointment_score_medium_value = { + value = appointment_medium_influence_cost + multiply = 0.2 +} + +appointment_score_major_value = { + value = appointment_major_influence_cost + multiply = 0.2 +} + +appointment_score_minor_loss_value = { + value = appointment_score_minor_value + multiply = -1 +} + +appointment_score_medium_loss_value = { + value = appointment_score_medium_value + multiply = -1 +} + +appointment_score_major_loss_value = { + value = appointment_score_major_value + multiply = -1 +} + +appointment_score_max_tt_value = { + value = 0 + if = { + limit = { + exists = scope:target + exists = scope:secondary_recipient + } + add = { + value = "scope:target.current_heir.appointment_candidate_score(scope:target)" + multiply = 1.1 + } + subtract = "scope:secondary_recipient.appointment_candidate_score(scope:target)" + } + min = 4 # We do this to prevent cases when the default score of the candidate is already much higher than that the heir + multiply = scope:actor.appointment_score_interaction_multiplier_modifiers_value +} + +appointment_score_medium_tt_value = { + value = appointment_score_medium_value + multiply = scope:actor.appointment_score_interaction_multiplier_modifiers_value +} + +appointment_score_major_tt_value = { + value = appointment_score_major_value + multiply = scope:actor.appointment_score_interaction_multiplier_modifiers_value +} + +appointment_score_medium_loss_tt_value = { + value = appointment_score_medium_loss_value + multiply = scope:actor.appointment_score_interaction_multiplier_modifiers_value +} + +appointment_score_major_loss_tt_value = { + value = appointment_score_major_loss_value + multiply = scope:actor.appointment_score_interaction_multiplier_modifiers_value +} + +appointment_non_preferred_gender_penalty_value = 0.8 +appointment_opposite_gender_penalty_value = 1 + +admin_council_cost_value = { + add = { + add = { + value = monumental_influence_value + multiply = 2 + } + desc = BASE + } + + # Cost reduction from Estates + if = { + limit = { + scope:actor ?= { + domicile ?= { has_domicile_parameter = estate_reduce_council_position_cost } + } + } + multiply = { + value = { + value = 1 + subtract = estate_reduce_council_position_cost_value + } + desc = market_02_domicile_building + } + } + + # Cost reduction from lifestyles + if = { + limit = { + scope:actor ?= { + has_perk = positions_of_power_perk + } + } + multiply = { + value = { + value = 1 + subtract = admin_council_cost_perk_value + } + desc = "[GetPerk('honored_to_serve_perk').GetName(GetPlayer)]" + } + } + + # Being a Powerful or Dominant Family reduces the cost significantly + if = { + limit = { + scope:actor.house = { is_dominant_family = yes } + } + multiply = { + value = 0.25 + desc = is_dominant_family_desc + } + } + else_if = { + limit = { + scope:actor.house = { is_powerful_family = yes } + } + multiply = { + value = 0.5 + desc = is_powerful_family_desc + } + } +} +admin_council_loss_value = { + value = admin_council_cost_value + multiply = -1 +} +admin_council_cost_perk_value = 0.3 + +admin_state_faith_cost_perk_value = 0.2 + +estate_move_cooldown_value = 180 +estate_governor_efficiency_bonus_value = 0.1 +estate_governor_efficiency_house_bonus_value = 0.05 +estate_increased_governance_scheme_success_value = 10 +estate_local_theme_cost_reduction_value = -0.25 +estate_court_tutor_cost_reduction_value = 0.5 +estate_increased_tutor_aptitude_value = 20 +estate_increase_charioteer_aptitude_value = 20 +estate_improved_wine_cellar_1_value = 0.1 +estate_improved_wine_cellar_2_value = 0.25 +estate_improved_wine_cellar_3_value = 0.5 +estate_increase_bodyguard_aptitude_1_value = 5 +estate_increase_bodyguard_aptitude_2_value = 15 +estate_cheaper_feast_cost_value = 0.2 +estate_reduce_council_position_cost_value = 0.2 +estate_reduce_commission_artifact_cost_value = 0.5 +estate_increase_antiquarian_aptitude_value = 20 +estate_increase_physician_aptitude_value = 10 +estate_increase_master_of_hunt_aptitude_value = 20 +estate_increase_master_of_horse_aptitude_value = 20 +estate_cheaper_hunt_cost_value = 0.2 +estate_granary_gold_bonus_value = 0.5 +estate_increase_powerful_famil_rating_per_dynasty_level_value = 3 + +chariot_kathisma_access_difficulty_value = { + value = medium_skill_rating + if = { + limit = { + OR = { + is_powerful_vassal = yes + any_held_title = { is_noble_family_title = yes } + } + } + divide = 2 + } +} + +marshal_court_jester_contribution_value = { + add = diplomacy + divide = 60 +} + +camp_improved_court_physician_aptitude_value = 10 + +ep3_iconoclast_vassal_count = { + value = 0 + every_vassal_or_below = { + limit = { faith = faith:iconoclast } + add = 1 + } +} + +# DYNASTY LEGACY PERKS + + +#CONTRACTS +task_contract_tier_value = { + value = highest_held_title_tier +} + +task_contract_escort_gold_value = { + value = minor_gold_max_value + if = { + limit = { + highest_held_title_tier > 1 + } + multiply = highest_held_title_tier + } +} +#ratio between attacker's military strength and defender's strength +task_contract_join_war_attacker_strength_ratio_value = { + value = scope:attacker.current_military_strength + divide = scope:defender.current_military_strength +} + +task_contract_war_duration_value = { + value = root.war_days +} +task_contract_attacker_war_score_value = { + value = root.attacker_war_score +} +task_contract_defender_war_score_value = { + value = root.defender_war_score +} +task_contract_t1_value = { value = define:NTaskContract|LOW_TASK_CONTRACT_TIER } +task_contract_t2_value = { value = define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER } +task_contract_t3_value = { value = define:NTaskContract|HIGH_TASK_CONTRACT_TIER } + +council_task_contracts_limit_value = { + value = 1 +} + +################################################## +# Contract Reward Values + +# Gold values for laamps. +## Basic gold values are based on domain/income size. This isn't useful for us, so we balance on a separate scale. +## Bear in mind that these are heavily scaled by _tier_ later on. +miniscule_gold_laamps_value = { + value = 5 + if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + multiply = 1.75 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + multiply = 1.25 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_early_medieval } + } + multiply = 1 + } + else = { multiply = 0.75 } +} +tiny_gold_laamps_value = { + value = 10 + if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + multiply = 1.75 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + multiply = 1.25 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_early_medieval } + } + multiply = 1 + } + else = { multiply = 0.75 } +} +minor_gold_laamps_value = { + value = 25 + if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + multiply = 1.75 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + multiply = 1.25 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_early_medieval } + } + multiply = 1 + } + else = { multiply = 0.75 } +} +medium_gold_laamps_value = { + value = 50 + if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + multiply = 1.75 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + multiply = 1.25 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_early_medieval } + } + multiply = 1 + } + else = { multiply = 0.75 } +} +major_gold_laamps_value = { + value = 80 + if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + multiply = 1.75 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + multiply = 1.25 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_early_medieval } + } + multiply = 1 + } + else = { multiply = 0.75 } +} +massive_gold_laamps_value = { + value = 120 + if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + multiply = 1.75 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + multiply = 1.25 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_early_medieval } + } + multiply = 1 + } + else = { multiply = 0.75 } +} +monumental_gold_laamps_value = { + value = 180 + if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + multiply = 1.75 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + multiply = 1.25 + } + else_if = { + limit = { + culture = { has_cultural_era_or_later = culture_era_early_medieval } + } + multiply = 1 + } + else = { multiply = 0.75 } +} + +# Opinion. +## Default opinion reward for excelling when completing a contract. +task_contract_opinion_excelled_reward_value = 60 +## Default opinion reward for successfully completing a contract. +task_contract_opinion_standard_reward_value = 30 +## Default opinion reward for kinda completing a contract. +task_contract_opinion_reduced_reward_value = 20 +## Default opinion penalty for goofing a contract. +task_contract_opinion_standard_failure_value = -30 +## Default opinion penalty for _massively_ goofing a contract. +task_contract_opinion_critical_failure_value = -50 +## Opinion penalty for successfully prosecuting a criminal contract against someone. +task_contract_opinion_crime_success_value = -60 +## Opinion penalty for successfully prosecuting a criminal contract against someone. +task_contract_opinion_crime_failure_value = -30 +## Opinion penalty for successfully prosecuting a criminal contract against someone. +task_contract_opinion_crime_backed_down_value = -10 + +# Extra rewards. +task_contract_extra_reward_multiplier_value = 1.5 # Update all relevant parameter tootlips if this is changed! e.g. improved_learning_contract_rewards + +# How do we multiply the cash rewards in a task contract depending on the employer's tier? +task_contract_tier_gold_multiplier_value = { + scope:task_contract.task_contract_employer ?= { + # Kings'n'emperors. + if = { + limit = { highest_held_title_tier >= define:NTaskContract|HIGH_TASK_CONTRACT_TIER } + add = 3 + } + # Dukes. + else_if = { + limit = { highest_held_title_tier >= define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER } + add = 2 + } + # Courtiers first, as we give them a bit less. + else_if = { + limit = { highest_held_title_tier <= 0 } + add = 0.5 + ceiling = yes + } + # Lastly, barons and counts are neutral, so no multiplier needed here. + else = { add = 1 } + } +} +# How do we multiply the non-cash rewards in a task contract depending on the employer's tier? +task_contract_tier_other_reward_multiplier_value = { + scope:task_contract.task_contract_employer = { + # Kings'n'emperors. + if = { + limit = { highest_held_title_tier >= define:NTaskContract|HIGH_TASK_CONTRACT_TIER } + add = 2.5 + } + # Dukes. + else_if = { + limit = { highest_held_title_tier >= define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER } + add = 1.5 + } + # Lastly, barons and counts are neutral, so no multiplier needed here. + else = { add = 1 } + } +} + +# PRESTIGE — NORMAL CONTRACTS +## Default scaling reward. +task_contract_success_prestige_gain_full_value = { + value = 150 + multiply = task_contract_tier_other_reward_multiplier_value + if = { + limit = { + scope:taker ?= { + has_perk = firm_hand_perk + } + } + multiply = 1.2 + } +} +## Boosted scaling reward. +task_contract_success_prestige_gain_critical_value = { + value = task_contract_success_prestige_gain_full_value + multiply = 1.5 +} +## Half default scaling reward. +task_contract_success_prestige_gain_half_value = { + value = task_contract_success_prestige_gain_full_value + multiply = 0.5 + min = 25 +} +## Default scaling loss on failure. +task_contract_failure_prestige_loss_full_value = { + value = -25 + multiply = task_contract_tier_other_reward_multiplier_value +} +## Doubled prestige loss +task_contract_failure_prestige_loss_double_value = { + value = task_contract_failure_prestige_loss_full_value + multiply = 2 +} + +# PRESTIGE — CRIMINAL CONTRACTS +## Criminal scaling loss on failure. +### A little higher, for obvious reasons. +task_contract_failure_prestige_loss_crime_value = { + value = task_contract_failure_prestige_loss_full_value + multiply = task_contract_tier_other_reward_multiplier_value +} +task_contract_failure_prestige_loss_crime_half_value = { + value = task_contract_failure_prestige_loss_crime_value + multiply = 0.5 +} +## Default award on invalidation. +task_contract_invalidated_prestige_gain_value = { + value = task_contract_success_prestige_gain_full_value + multiply = 0.5 +} + +# PIETY +## Default scaling reward. +task_contract_success_piety_gain_full_value = { + value = 100 + multiply = task_contract_tier_other_reward_multiplier_value +} +##Critical scaling reward +task_contract_success_piety_gain_critical_value = { + value = task_contract_success_piety_gain_full_value + multiply = 2 +} +## Half default scaling reward. +task_contract_success_piety_gain_half_value = { + value = task_contract_success_piety_gain_full_value + multiply = 0.5 + min = 25 +} +## Default scaling loss on failure. +task_contract_failure_piety_loss_full_value = { + value = -50 + multiply = task_contract_tier_other_reward_multiplier_value +} + +# GOLD — NORMAL CONTRACTS +## Default scaling reward. +task_contract_success_gold_gain_full_value = { + # Base value + multiplier. + value = 50 + multiply = task_contract_tier_gold_multiplier_value + # Lifestyle perks. + if = { + limit = { + scope:task_contract.task_contract_taker ?= { has_perk = at_any_cost_perk } + } + multiply = 1.25 + } + # Stuff that NEEDS to stay at the bottom. + ## Vary our final tally up a bit. + if = { + limit = { scope:task_contract.task_contract_employer.ai_greed != 0 } + add = { + value = scope:task_contract.task_contract_employer.ai_greed + multiply = -0.2 + } + } + ## Plus change the last digit around slightly so the values look a little less robotic. + scope:gold_fuzz ?= { add = scope:gold_fuzz } + ## And boost a bit further for exceptional rewards, so that they're never beneath the common rewards. + if = { + limit = { scope:gold_safety_margin ?= flag:yes } + add = 10 + } + ## Shouldn't happen but just in case someone is really, really, _really_ stingy: never pay less than at least a truly pathetic amount. + min = 25 +} +## Critical scaling reward. +task_contract_success_gold_gain_critical_value = { + value = task_contract_success_gold_gain_full_value + if = { + limit = { exists = scope:task_contract_tier } + if = { + limit = { scope:task_contract_tier >= 3 } + multiply = 1.25 + } + else_if = { + limit = { scope:task_contract_tier >= 2 } + multiply = 1.5 + } + else = { multiply = 1.75 } + } + else = { + if = { + limit = { scope:task_contract.task_contract_tier >= 3 } + multiply = 1.25 + } + else_if = { + limit = { scope:task_contract.task_contract_tier >= 2 } + multiply = 1.5 + } + else = { multiply = 1.75 } + } +} +## Half default scaling reward. +task_contract_success_gold_gain_half_value = { + value = task_contract_success_gold_gain_full_value + multiply = 0.5 +} +## One third default scaling reward. +task_contract_success_gold_gain_third_value = { + value = task_contract_success_gold_gain_full_value + multiply = 0.33 +} +## Default award on invalidation. +task_contract_invalidated_gold_gain_value = { + value = task_contract_success_gold_gain_full_value + multiply = 0.1 +} + +# GOLD — TRAVEL CONTRACTS +## Travel scaling reward. +task_contract_success_gold_gain_travel_value = { + # Base value + multiplier. + value = 75 + multiply = task_contract_tier_gold_multiplier_value + # Lifestyle perks. + if = { + limit = { + scope:task_contract.task_contract_taker = { has_perk = at_any_cost_perk } + } + multiply = 1.25 + } + if = { + limit = { + scope:task_contract.task_contract_taker = { has_perk = malice_implicit_perk } + } + multiply = 2 + } + # Stuff that NEEDS to stay at the bottom. + ## Vary our final tally up a bit. + if = { + limit = { scope:task_contract.task_contract_employer.ai_greed != 0 } + add = { + value = scope:task_contract.task_contract_employer.ai_greed + multiply = -0.2 + } + } + ## Plus change the last digit around slightly so the values look a little less robotic. + scope:gold_fuzz ?= { add = scope:gold_fuzz } + ## And boost a bit further for exceptional rewards, so that they're never beneath the common rewards. + if = { + limit = { scope:gold_safety_margin ?= flag:yes } + add = 10 + } + ## Shouldn't happen but just in case someone is really, really, _really_ stingy: never pay less than at least a truly pathetic amount. + min = 25 +} +## Travel critical scaling reward. +task_contract_success_gold_gain_critical_travel_value = { + value = task_contract_success_gold_gain_travel_value + if = { + limit = { exists = scope:task_contract_tier } + if = { + limit = { scope:task_contract_tier >= 3 } + multiply = 1.25 + } + else_if = { + limit = { scope:task_contract_tier >= 2 } + multiply = 1.5 + } + else = { multiply = 1.75 } + } + else = { + if = { + limit = { scope:task_contract.task_contract_tier >= 3 } + multiply = 1.25 + } + else_if = { + limit = { scope:task_contract.task_contract_tier >= 2 } + multiply = 1.5 + } + else = { multiply = 1.75 } + } +} +## Half travel scaling reward. +task_contract_success_gold_gain_half_travel_value = { + value = task_contract_success_gold_gain_travel_value + multiply = 0.5 +} + +# GOLD — CRIMINAL CONTRACTS +## Criminal scaling reward. +task_contract_success_gold_gain_crime_value = { + # Base value + multiplier. + value = 100 + multiply = task_contract_tier_gold_multiplier_value + # Lifestyle perks. + if = { + limit = { + scope:task_contract.task_contract_taker = { has_perk = at_any_cost_perk } + } + multiply = 1.25 + } + if = { + limit = { + scope:task_contract.task_contract_taker = { has_perk = malice_implicit_perk } + } + multiply = 2 + } + # Stuff that NEEDS to stay at the bottom. + ## Vary our final tally up a bit. + ### This time, we add _more_ gold the greedier the employer is — it's a criminal reward, so the greedier they are, the more gold they have available (albeit not to the same degree as the inverse in normal contracts). + if = { + limit = { scope:task_contract.task_contract_employer.ai_greed > 1 } + add = { + value = scope:task_contract.task_contract_employer.ai_greed + multiply = 0.1 + } + } + ### Take it down only a marginal amount for generous chars, as we still want criminal contracts to almost always pay more. + else_if = { + limit = { scope:task_contract.task_contract_employer.ai_greed < -1 } + add = { + value = scope:task_contract.task_contract_employer.ai_greed + multiply = -0.05 + } + } + ## Plus change the last digit around slightly so the values look a little less robotic. + scope:gold_fuzz ?= { add = scope:gold_fuzz } + ## And boost a bit further for exceptional rewards, so that they're never beneath the common rewards. + if = { + limit = { scope:gold_safety_margin ?= flag:yes } + add = 10 + } + ## Shouldn't happen but just in case someone is really, really, _really_ stingy: never pay less than at least a truly pathetic amount. + min = 60 +} +## Criminal critical scaling reward. +task_contract_success_gold_gain_critical_crime_value = { + value = task_contract_success_gold_gain_crime_value + if = { + limit = { exists = scope:task_contract_tier } + if = { + limit = { scope:task_contract_tier >= 3 } + multiply = 1.25 + } + else_if = { + limit = { scope:task_contract_tier >= 2 } + multiply = 1.5 + } + else = { multiply = 1.75 } + } + else = { + if = { + limit = { scope:task_contract.task_contract_tier >= 3 } + multiply = 1.25 + } + else_if = { + limit = { scope:task_contract.task_contract_tier >= 2 } + multiply = 1.5 + } + else = { multiply = 1.75 } + } +} +## Half criminal scaling reward. +task_contract_success_gold_gain_half_crime_value = { + value = task_contract_success_gold_gain_crime_value + multiply = 0.5 +} + +# Provisions. +## We don't scale these by tier. +task_contract_success_provisions_gain_minor_value = 250 +task_contract_success_provisions_gain_medium_value = 500 +task_contract_success_provisions_gain_major_value = 1000 +task_contract_success_provisions_gain_massive_value = 1500 +task_contract_failure_provisions_gain_minor_value = 0 + +adventurer_siege_replenish_amount = { + value = 0 + add = scope:barony.title_province.available_loot + multiply = { + value = 2 + if = { + limit = { + root = { has_perk = a_mans_home_perk } + } + add = 2 + } + } +} + +adventurer_siege_provisions_amount = { + value = 0 + add = scope:barony.title_province.available_loot + multiply = 20 +} + +human_provision_value = { + value = 100 + add = scope:recipient.current_weight + multiply = 3 +} + +# Gallowsbait XP +reduced_criminal_contract_xp_gain_value = 0.75 +reduced_criminal_contract_xp_gain_loc_value = { + value = 1 + subtract = reduced_criminal_contract_xp_gain_value +} +gallowsbait_xp_minor_gain = small_lifestyle_random_xp_low +gallowsbait_xp_medium_gain = { + value = gallowsbait_xp_minor_gain + multiply = 2 # Between low and mid +} +gallowsbait_xp_major_gain = small_lifestyle_random_xp_mid +gallowsbait_xp_massive_gain = small_lifestyle_random_xp_high + +# Knight Errant XP +knight_errant_xp_minor_gain = small_lifestyle_random_xp_low +knight_errant_xp_medium_gain = { + value = knight_errant_xp_minor_gain + multiply = 2 # Between low and mid +} +knight_errant_xp_major_gain = small_lifestyle_random_xp_mid +knight_errant_xp_massive_gain = small_lifestyle_random_xp_high + +laamp_base_0011_num_removable_potential_rivals_value = { + every_relation = { + type = potential_rival + limit = { laamp_base_0011_valid_potential_rival_trigger = yes } + add = 1 + } +} + +laamp_base_2041_num_counties_to_rob_sans_capital_value = { + value = laamp_base_2041_num_counties_to_rob_value + add = -1 +} + +laamp_base_2041_num_counties_to_rob_value = { + add = highest_held_title_tier + add = 2 +} + +laamp_base_2011_desired_surveyable_holdings_per_tier_value = { + value = highest_held_title_tier + add = -1 + multiply = 3 +} +laamp_base_2011_actual_surveyable_holdings_per_tier_value = { + value = sub_realm_size + every_sub_realm_barony = { + limit = { + exists = holder + holder.highest_held_title_tier = tier_barony + NOT = { this = root.domicile.domicile_location } + } + add = 1 + } +} + +laamp_base_contract_schemes_1301_min_troops_value = 750 +laamp_base_contract_schemes_2661_other_skill_threshold_value = very_high_skill_rating +laamp_base_contract_schemes_2661_sacrifice_loan_length_min_value = 4 +laamp_base_contract_schemes_2661_sacrifice_loan_length_max_value = 8 + +################################################## +# Camp Values + +adventurer_hard_rule_contract_rewards_value = 1.25 + +# How much bonus gold do we get from warfare contracts for having the lockwagon upgrade? +## Applied within a script value, not as an extra modifier. +camp_improved_mercenary_contract_rewards_value = 1.5 +## Shift the value around a bit for loc. +camp_improved_mercenary_contract_rewards_loc_value = { + value = camp_improved_mercenary_contract_rewards_value + add = -1 +} + +# How much a proportion of a camp building's cost do we get back on demolishing it? +camp_refund_mult_value = 0.5 + +# Camp additional buildings standard costs. +camp_building_upgrade_cost_t1_value = 60 +camp_building_upgrade_cost_t2_value = 120 +camp_building_upgrade_cost_t3_value = 180 +camp_building_upgrade_cost_t4_value = 240 +camp_building_upgrade_cost_t5_value = 300 +camp_building_upgrade_cost_t6_value = 360 + +# Assorted gold costs for camp buildings. +camp_main_02_domicile_building_gold_cost_value = 200 +camp_main_03_domicile_building_gold_cost_value = 350 +camp_main_04_domicile_building_gold_cost_value = 500 +supply_tent_01_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +supply_tent_02_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +supply_tent_03_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +supply_tent_04_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +supply_tent_05_domicile_building_gold_cost_value = camp_building_upgrade_cost_t5_value +supply_tent_06_domicile_building_gold_cost_value = camp_building_upgrade_cost_t6_value +supply_tent_sutler_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +supply_tent_mender_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +supply_tent_smithy_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +supply_tent_arsenal_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +supply_tent_reserve_provisions_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +supply_tent_reserve_water_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +supply_tent_climbing_gear_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +supply_tent_subdued_gear_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +barber_tent_01_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +barber_tent_02_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +barber_tent_03_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +barber_tent_04_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +barber_tent_05_domicile_building_gold_cost_value = camp_building_upgrade_cost_t5_value +barber_tent_06_domicile_building_gold_cost_value = camp_building_upgrade_cost_t6_value +barber_tent_surgeons_tools_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +barber_tent_dentists_tools_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +barber_tent_torturers_tools_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +barber_tent_reference_corpus_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +barber_tent_morticians_tools_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +baggage_train_01_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +baggage_train_02_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +baggage_train_03_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +baggage_train_04_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +baggage_train_05_domicile_building_gold_cost_value = camp_building_upgrade_cost_t5_value +baggage_train_06_domicile_building_gold_cost_value = camp_building_upgrade_cost_t6_value +baggage_train_ample_steeds_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +baggage_train_porters_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +baggage_train_trackers_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +baggage_train_kennel_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +baggage_train_siege_engineers_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +baggage_train_shrine_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +baggage_train_scribes_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +baggage_train_bartering_grounds_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +baggage_train_proof_of_claims_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +baggage_train_ransom_cages_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +baggage_train_negotiators_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +baggage_train_ascetics_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +baggage_train_pleasure_tents_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +mess_tent_01_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +mess_tent_02_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +mess_tent_03_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +mess_tent_04_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +mess_tent_05_domicile_building_gold_cost_value = camp_building_upgrade_cost_t5_value +mess_tent_06_domicile_building_gold_cost_value = camp_building_upgrade_cost_t6_value +mess_tent_herbalists_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +mess_tent_brewers_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +mess_tent_curers_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +mess_tent_bakers_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +mess_tent_cooks_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +camp_fire_01_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +camp_fire_02_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +camp_fire_03_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +camp_fire_04_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +camp_fire_05_domicile_building_gold_cost_value = camp_building_upgrade_cost_t5_value +camp_fire_06_domicile_building_gold_cost_value = camp_building_upgrade_cost_t6_value +camp_fire_trailing_musicians_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +camp_fire_wandering_poets_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +camp_fire_capering_fools_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +camp_fire_libations_for_the_lost_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +camp_fire_local_hangers_on_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +camp_fire_future_dreams_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +camp_fire_nightly_debates_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +camp_fire_juicy_rumors_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +proving_grounds_01_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +proving_grounds_02_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +proving_grounds_03_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +proving_grounds_04_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +proving_grounds_05_domicile_building_gold_cost_value = camp_building_upgrade_cost_t5_value +proving_grounds_06_domicile_building_gold_cost_value = camp_building_upgrade_cost_t6_value +proving_grounds_horse_run_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +proving_grounds_camel_run_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +proving_grounds_elephantry_reserve_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +proving_grounds_nightly_barding_drills_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +proving_grounds_life_in_the_saddle_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +proving_grounds_the_stump_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +proving_grounds_personal_bouts_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +proving_grounds_training_circle_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +proving_grounds_mock_battle_drills_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +proving_grounds_lockwagon_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +proving_grounds_martial_study_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +proving_grounds_the_stick_game_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +proving_grounds_bodyguard_drills_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +camp_perimeter_01_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +camp_perimeter_02_domicile_building_gold_cost_value = camp_building_upgrade_cost_t2_value +camp_perimeter_03_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +camp_perimeter_04_domicile_building_gold_cost_value = camp_building_upgrade_cost_t4_value +camp_perimeter_05_domicile_building_gold_cost_value = camp_building_upgrade_cost_t5_value +camp_perimeter_06_domicile_building_gold_cost_value = camp_building_upgrade_cost_t6_value +camp_perimeter_good_siting_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +camp_perimeter_fixed_layout_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +camp_perimeter_extra_watch_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +camp_perimeter_palisade_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value +camp_perimeter_ditch_domicile_building_gold_cost_value = camp_building_upgrade_cost_t3_value +camp_perimeter_camp_hygiene_domicile_building_gold_cost_value = camp_building_upgrade_cost_t1_value + +# Control weights for camp ai_will_do buildings. +## Base value. +camp_building_ai_base_t1 = 70 +camp_building_ai_base_t2 = 80 +camp_building_ai_base_t3 = 90 +camp_building_ai_base_t4 = 100 +### We use this for both highly useful buildings & for unique unlocks, so that camps prioritise stuff specific to their purpose. +camp_building_ai_base_t5 = 100 +## Flavour bonuses. +camp_building_ai_bonus_t1 = 10 +camp_building_ai_bonus_t2 = 20 +camp_building_ai_bonus_t3 = 30 +## Flavour penalties. +camp_building_ai_malus_t1 = -20 +camp_building_ai_malus_t2 = -40 +camp_building_ai_malus_t3 = -60 +## Camp Purpose-specific bonuses. +camp_building_ai_camp_purpose_t1 = 20 +camp_building_ai_camp_purpose_t2 = 40 +camp_building_ai_camp_purpose_t3 = 60 +## Try to pick matching upgrades depending on our lifestyle. +camp_building_ai_lifestyle_bias_value = 75 + +# Various camp ai_will_do building values. +camp_main_main_path_value = { + value = camp_building_ai_base_t3 + # Traits. + ## ++ Arrogant. + if = { + limit = { + owner = { has_trait = arrogant } + } + add = camp_building_ai_bonus_t2 + } + ## ++ Ambitious. + if = { + limit = { + owner = { has_trait = ambitious } + } + add = camp_building_ai_bonus_t2 + } + ## - Content. + if = { + limit = { + owner = { has_trait = content } + } + add = camp_building_ai_malus_t1 + } + ## -- Humble. + if = { + limit = { + owner = { has_trait = humble } + } + add = camp_building_ai_malus_t2 + } +} +supply_tent_main_path_value = { + value = camp_building_ai_base_t4 + # Traits. + ## +++ Logistician. + if = { + limit = { + owner = { has_trait = logistician } + } + add = camp_building_ai_bonus_t3 + } + ## +++ Organiser. + if = { + limit = { + owner = { has_trait = organizer } + } + add = camp_building_ai_bonus_t3 + } + ## + Patient + if = { + limit = { + owner = { has_trait = patient } + } + add = camp_building_ai_bonus_t1 + } + ## + Diligent. + if = { + limit = { + owner = { has_trait = diligent } + } + add = camp_building_ai_bonus_t1 + } + ## - Lazy. + if = { + limit = { + owner = { has_trait = lazy } + } + add = camp_building_ai_malus_t1 + } + # Camp Purpose. + if = { + limit = { + owner = { + OR = { + has_realm_law_flag = unlocks_supply_tent_reserve_provisions + has_realm_law_flag = unlocks_supply_tent_reserve_water + has_realm_law_flag = unlocks_supply_tent_climbing_gear + has_realm_law_flag = unlocks_supply_tent_subdued_gear + } + } + } + add = camp_building_ai_camp_purpose_t2 + } +} +barber_tent_main_path_value = { + value = camp_building_ai_base_t2 + # Traits. + ## +++ Lifestyle Physician. + if = { + limit = { + owner = { has_trait = lifestyle_physician } + } + add = camp_building_ai_bonus_t3 + } + ## ++ Whole of Body. + if = { + limit = { + owner = { has_trait = whole_of_body } + } + add = camp_building_ai_bonus_t2 + } + ## + Gregarious. + if = { + limit = { + owner = { has_trait = gregarious } + } + add = camp_building_ai_bonus_t1 + } + ## + Eccentric. + if = { + limit = { + owner = { has_trait = eccentric } + } + add = camp_building_ai_bonus_t1 + } + # Camp Purpose. + if = { + limit = { + owner = { + OR = { + has_realm_law_flag = unlocks_barber_tent_reference_corpus + has_realm_law_flag = unlocks_barber_tent_morticians_tools + } + } + } + add = camp_building_ai_camp_purpose_t1 + } +} +baggage_train_main_path_value = { + value = camp_building_ai_base_t4 + # Traits. + ## +++ Logistician. + if = { + limit = { + owner = { has_trait = logistician } + } + add = camp_building_ai_bonus_t3 + } + ## +++ Organiser. + if = { + limit = { + owner = { has_trait = organizer } + } + add = camp_building_ai_bonus_t3 + } + ## ++ Gregarious. + if = { + limit = { + owner = { has_trait = gregarious } + } + add = camp_building_ai_bonus_t2 + } + ## ++ Diligent. + if = { + limit = { + owner = { has_trait = diligent } + } + add = camp_building_ai_bonus_t2 + } + ## - Lazy. + if = { + limit = { + owner = { has_trait = lazy } + } + add = camp_building_ai_malus_t1 + } + ## -- Shy. + if = { + limit = { + owner = { has_trait = shy } + } + add = camp_building_ai_malus_t2 + } + # Camp Purpose. + if = { + limit = { + owner = { + OR = { + has_realm_law_flag = unlocks_baggage_train_siege_engineers + has_realm_law_flag = unlocks_baggage_train_scribes + has_realm_law_flag = unlocks_baggage_train_proof_of_claims + has_realm_law_flag = unlocks_baggage_train_ransom_cages + has_realm_law_flag = unlocks_baggage_train_negotiators + has_realm_law_flag = unlocks_baggage_train_ascetics + } + } + } + add = camp_building_ai_camp_purpose_t3 + } +} +mess_tent_main_path_value = { + value = camp_building_ai_base_t2 + # Traits. + ## +++ Gluttonous. + if = { + limit = { + owner = { has_trait = gluttonous } + } + add = camp_building_ai_bonus_t3 + } + ## + Greedy. + if = { + limit = { + owner = { has_trait = greedy } + } + add = camp_building_ai_bonus_t1 + } + ## --- Temperate. + if = { + limit = { + owner = { has_trait = temperate } + } + add = camp_building_ai_malus_t3 + } +} +camp_fire_main_path_value = { + value = camp_building_ai_base_t3 + # Traits. + ## +++ Gregarious. + if = { + limit = { + owner = { has_trait = gregarious } + } + add = camp_building_ai_bonus_t3 + } + ## ++ Humble. + if = { + limit = { + owner = { has_trait = humble } + } + add = camp_building_ai_bonus_t2 + } + ## --- Arrogant. + if = { + limit = { + owner = { has_trait = arrogant } + } + add = camp_building_ai_malus_t3 + } + ## --- Shy. + if = { + limit = { + owner = { has_trait = shy } + } + add = camp_building_ai_malus_t3 + } + # Camp Purpose. + if = { + limit = { + owner = { + OR = { + has_realm_law_flag = unlocks_camp_fire_local_hangers_on + has_realm_law_flag = unlocks_camp_fire_future_dreams + has_realm_law_flag = unlocks_camp_fire_nightly_debates + has_realm_law_flag = unlocks_camp_fire_juicy_rumors + } + } + } + add = camp_building_ai_camp_purpose_t3 + } +} +proving_grounds_main_path_value = { + value = camp_building_ai_base_t3 + # Traits. + ## +++ Wrathful. + if = { + limit = { + owner = { has_trait = wrathful } + } + add = camp_building_ai_bonus_t3 + } + ## +++ Athletic. + if = { + limit = { + owner = { has_trait = athletic } + } + add = camp_building_ai_bonus_t3 + } + ## - Calm. + if = { + limit = { + owner = { has_trait = calm } + } + add = camp_building_ai_malus_t1 + } + # Camp Purpose. + if = { + limit = { + owner = { + OR = { + has_realm_law_flag = unlocks_proving_grounds_lockwagon + has_realm_law_flag = unlocks_proving_grounds_martial_study + has_realm_law_flag = unlocks_proving_grounds_the_stick_game + has_realm_law_flag = unlocks_proving_grounds_bodyguard_drills + } + } + } + add = camp_building_ai_camp_purpose_t3 + } +} +camp_perimeter_main_path_value = { + value = camp_building_ai_base_t1 + # Traits. + ## +++ Paranoid. + if = { + limit = { + owner = { has_trait = paranoid } + } + add = camp_building_ai_bonus_t3 + } + ## ++ Deceitful. + if = { + limit = { + owner = { has_trait = deceitful } + } + add = camp_building_ai_bonus_t2 + } + ## - Honest. + if = { + limit = { + owner = { has_trait = honest } + } + add = camp_building_ai_malus_t1 + } + ## --- Trusting. + if = { + limit = { + owner = { has_trait = trusting } + } + add = camp_building_ai_malus_t3 + } + # Camp Purpose. + if = { + limit = { + owner = { + OR = { + has_realm_law_flag = unlocks_camp_perimeter_extra_watch + has_realm_law_flag = unlocks_camp_perimeter_palisade + has_realm_law_flag = unlocks_camp_perimeter_ditch + } + } + } + add = camp_building_ai_camp_purpose_t1 + } +} + +################################################## +# Misc Values + +prison_break_value = { + value = 1 + if = { + limit = { + is_primary_heir_of = prev + } + add = 10 + } + if = { + limit = { + this = prev.primary_spouse + } + add = 10 + } +} + +# Powerful Family Rating +# House power score is used in code to enable bonuses from powerful houses +# root - house under evaluation +house_power_score = { + value = { + value = 0 + + save_temporary_scope_as = target_house + # Add a small amount of score for each house member within the realm + add = { + every_house_member = { + add = 3 + } + desc = members_in_realm_desc + } + + # Add scoring based on the House Heads Level of Influence + if = { + limit = { + house_head ?= { influence_level >= 1 } + } + add = { + value = house_head.influence_level + multiply = 5 + desc = house_head_influence_level_desc + } + } + + # Add scoring for every house member on top liege's council + add = { + house_head.top_liege = { + every_councillor = { + limit = { + house = scope:target_house + } + add = 15 + } + } + desc = house_members_on_council_desc + } + + # Malus for not practicing the state faith + if = { + limit = { + NOT = { house_head.top_liege.primary_title.state_faith ?= house_head.faith } + } + add = { + value = -25 + desc = house_head_different_faith_powerful_family_rating + } + } + + # Estate building bonuses + if = { # Market + limit = { + house_head = { + domicile ?= { + has_domicile_parameter = estate_increase_powerful_family_rating + has_domicile_building_or_higher = market_05 + } + } + } + add = { + value = 30 + desc = estate_buildings_desc + } + } + else_if = { + limit = { + house_head = { + domicile ?= { + has_domicile_parameter = estate_increase_powerful_family_rating + has_domicile_building_or_higher = market_03 + } + } + } + add = { + value = 20 + desc = estate_buildings_desc + } + } + else_if = { + limit = { + house_head = { + domicile ?= { has_domicile_parameter = estate_increase_powerful_family_rating } + } + } + add = { + value = 10 + desc = estate_buildings_desc + } + } + if = { # Catacombs + limit = { + exists = house_head.dynasty + house_head = { + domicile ?= { has_domicile_parameter = estate_powerful_family_rating_per_dynasty_level } + } + } + add = { + value = estate_increase_powerful_famil_rating_per_dynasty_level_value + multiply = house_head.dynasty.dynasty_prestige_level + desc = estate_buildings_desc + } + } + + # When your estate is located in the realm's capital + if = { + limit = { + house_head = { + exists = top_liege.capital_province + domicile ?= { + is_domicile_type = estate + domicile_location = prev.top_liege.capital_province + } + } + } + add = { + value = 10 + desc = estate_in_capital_desc + } + } + + # Obligation/Theme Administration bonus + if = { + limit = { + house_head = { vassal_contract_has_flag = admin_prestige_obligation_bonus } + } + add = { + value = 10 + desc = imperial_theme_type_desc + } + } + + # Heart of the Family Diplomacy Lifestyle Perk + if = { + limit = { house_head = { has_perk = familial_familiar_perk } } + add = { + value = 10 + desc = familial_familiar_perk_name + } + } + + # Base score increase from Power is a Ladder dynasty legacy perk + if = { + limit = { + house_head.dynasty = { ep3_administrative_legacy_track_perks >= 3 } + } + add = { + value = 15 + desc = ep3_administrative_legacy_3_name + } + } + + # From Mass Arrests Decision + if = { + limit = { house_head = { has_character_flag = mass_arrests_house_power_malus } } + add = { + value = -15 + desc = ep3_mass_arrests_house_power_malus + } + } + + # The number of governorships the house holds + multiply = { + value = 1 + every_house_member = { + limit = { + is_governor = yes + top_liege = house.house_head.top_liege + } + add = 0.4 # Let's add a multiplier to the overall score for each governorship + } + desc = held_governoships_desc + } + + # Bonus for being the imperial house (we deliberately but this at the end, behind the governorship multiplier, as an added bonus on top of everything else) + if = { + limit = { + any_house_member = { + is_independent_ruler = yes + primary_title.tier >= tier_empire + top_liege = house.house_head.top_liege + } + } + add = { + value = 100 + desc = imperial_house_desc + } + } + + # Status Challenged + if = { + limit = { has_variable_list = status_challenged_by } + save_temporary_value_as = temp_total + subtract = { + value = scope:temp_total + multiply = { + value = 0.05 + multiply = { + value = 0 + every_in_list = { + variable = status_challenged_by + add = 1 + } + } + } + desc = challenge_status_powerful_family_rating_modifier + } + } + } + + round = yes +} + +# Maximum investment a character can make to support a candidate for a title appointment +# root - investor +appointment_investment_cap = { + value = { + add = { + value = 50 # Base + desc = BASE_VALUE + } + ##### FAMILY RATING + if = { + limit = { house.house_head ?= this } + add = { + value = house.house_power_score + desc = appointment_investment_cap_family_rating + } + } + ##### AGE + if = { # ADULT - scaling bonus + limit = { is_adult = yes } + add = { + value = { + add = age + subtract = 16 + divide = 2 + ceiling = yes + } + desc = appointment_investment_cap_age + } + } + else = { # CHILD - scaling malus + add = { + value = { + add = age + subtract = 16 + divide = 2 + floor = yes + } + desc = appointment_investment_cap_age + } + } + ##### INFLUENCE LEVEL + if = { # NEGATIVE + limit = { influence_level < 1 } + add = { + value = -20 + desc = appointment_investment_cap_influence_level + } + } + else_if = { # POSITIVE + limit = { influence_level > 1 } + add = { + value = { + add = influence_level + multiply = 10 + } + desc = appointment_investment_cap_influence_level + } + } + ##### ESTATE BUILDINGS + if = { + limit = { exists = house.house_head.domicile } + house.house_head.domicile = { + add = { + value = 0 + if = { + limit = { has_domicile_building = estate_main_02 } + add = 10 + } + else_if = { + limit = { has_domicile_building = estate_main_03 } + add = 20 + } + else_if = { + limit = { has_domicile_building = estate_main_04 } + add = 30 + } + else_if = { + limit = { has_domicile_building = estate_main_05 } + add = 40 + } + if = { + limit = { has_domicile_building = reception_hall_02 } + add = 10 + } + else_if = { + limit = { has_domicile_building = reception_hall_03 } + add = 20 + } + else_if = { + limit = { has_domicile_building = reception_hall_04 } + add = 30 + } + else_if = { + limit = { has_domicile_building = reception_hall_05 } + add = 40 + } + desc = appointment_investment_cap_estate_buildings + } + } + } + ### EXPANDED POWER BASE + save_temporary_value_as = temp_total + if = { + limit = { has_character_modifier = ep3_expanded_power_base_minor_modifier } + add = { + value = scope:temp_total + multiply = 0.10 + round = yes + min = 25 + desc = ep3_expanded_power_base_minor_modifier + } + } + if = { + limit = { has_character_modifier = ep3_expanded_power_base_medium_modifier } + add = { + value = scope:temp_total + multiply = 0.20 + round = yes + min = 50 + desc = ep3_expanded_power_base_medium_modifier + } + } + if = { + limit = { has_character_modifier = ep3_expanded_power_base_major_modifier } + add = { + value = scope:temp_total + multiply = 0.30 + round = yes + min = 75 + desc = ep3_expanded_power_base_major_modifier + } + } + min = 0 + } +} + +dominant_family_threshold_value = 0.25 +family_attribute_cooldown_tt_value = { + value = define:NHouse|HOUSE_POWER_BONUS_COOLDOWN_DAYS + divide = 365 + round = yes +} + +ep3_governor_yearly_8150_total_count_value = { + value = 0 + every_in_list = { + list = rebel_counties + add = 1 + } + every_in_list = { + list = potential_rebel_counties + add = 1 + } +} + +#special bonus to traveling friends from a court event +court_position_aptitude_traveling_friends_value = { + if = { + limit = { + has_character_flag = travelling_friend + liege ?= { + any_court_position_holder = { + OR = { + has_relation_best_friend = root + has_relation_friend = root + } + has_character_flag = travelling_friend + } + } + } + add = { + value = 20 + desc = court_position_traveling_friend + } + } +} + +ep3_foreign_ruler_interest_in_coup_value = { + value = 0 + every_claim = { + limit = { + any_de_jure_top_liege = { + this = scope:target_char + } + } + add = 1 + } + if = { + limit = { has_relation_nemesis = scope:target_char } + add = 2 + } + else_if = { + limit = { has_relation_rival = scope:target_char } + add = 1 + } +} + +ep3_distance_to_comparator_claim = { + value = 0 + add = "title_capital_county.squared_distance(scope:comparator.capital_county)" + abs = yes + multiply = -1 +} + +ep3_distance_to_comparator_capital_county = { + value = 0 + add = "squared_distance(scope:comparator.capital_county)" + abs = yes + multiply = -1 +} + +number_of_granaries_in_egypt_value = { + value = 0 + every_county_in_region = { + region = custom_roman_aegyptus + limit = { + any_county_province = { + has_building_or_higher = cereal_fields_05 + } + } + add = 1 + max = 10 + } + min = 1 + desc = MODIFIER_DEFINITION_MAIN_DESC_PER_EGYPT_GRANARY +} + +grain_dole_cost = { + value = 1500 +} + +pay_off_crusaders_value = { + value = 0 + every_in_list = { + list = paying_off_crusaders + add = 1 + } + multiply = 150 +} + +ep3_byz_regiments_gained_value = { + value = 1 + if = { + limit = { + exists = scope:regiment_1 + highest_held_title_tier >= tier_kingdom + } + add = 1 + } + if = { + limit = { + exists = scope:regiment_2 + OR = { + highest_held_title_tier >= tier_duchy + this = scope:attacker + } + } + add = 1 + } +} + +ep3_byz_regiments_ck_value = { + value = 0 + if = { + limit = { + exists = scope:regiment_1 + } + add = 2 + } + if = { + limit = { + exists = scope:regiment_2 + } + add = 3 + } +} + +ep3_byz_reward_levy_size_value = { + value = 100 + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 5 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 10 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 15 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 20 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 25 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 30 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 35 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 40 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 50 + } + } + add = 150 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 65 + } + } + add = 200 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 80 + } + } + add = 250 + } + if = { + limit = { + highest_held_title_tier = tier_duchy + } + multiply = 1.33 + } + if = { + limit = { + highest_held_title_tier >= tier_kingdom + } + multiply = 1.66 + } +} + +ep3_sacking_byz_capital_payoff_value = { + value = 220 + + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 5 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 10 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 15 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 20 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 25 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 30 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 35 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 40 + } + } + add = 100 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 50 + } + } + add = 150 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 65 + } + } + add = 200 + } + if = { + limit = { + title:e_byzantium.holder.capital_county = { + development_level >= 80 + } + } + add = 250 + } +} + +number_vassals_converting_to_new_state_faith = { + value = 0 + every_vassal = { + limit = { + opinion = { + target = root + value >= 30 + } + faith != root.faith + NOT = { has_vassal_stance = zealot } + is_ai = yes + } + add = 1 + } +} + +# Hasan Sabbah event troops + +hasan_sabbah_max_levies_value = 20000 + +hasan_sabbah_event_troops_value = { + value = 0 + + # Add troops for each appropriate county. + root.location.county.holder.top_liege = { + every_sub_realm_county = { + limit = { + faith = root.faith + } + add = 500 + } + } + + max = { + # Standard base max. + value = hasan_sabbah_max_levies_value + } + divide = 5 +} + +maa_regiments_cost_more_to_reinforce_per_soldier_trigger_mult = 4 + +provision_refill_value = { + value = 0.125 + if = { + limit = { + trigger_if = { + limit = { exists = scope:laamp_temp } + scope:laamp_temp = { has_perk = prepared_conscription_perk } + } + trigger_else = { always = no } + } + multiply = 1.25 + } + if = { + limit = { + scope:laamp_temp ?= { + has_perk = personal_touch_perk + landless_inspector_king_of_the_wilds = yes + } + } + multiply = 1.25 + } +} + +provision_refill_value_tt = { + value = 0.125 + if = { + limit = { has_perk = prepared_conscription_perk } + multiply = 1.25 + } + if = { + limit = { + has_perk = personal_touch_perk + landless_inspector_king_of_the_wilds = yes + } + multiply = 1.25 + } +} + +gold_refill_value = { + value = 3 + if = { + limit = { + scope:laamp_temp = { has_perk = cutting_corners_perk } + } + multiply = 1.25 + } + if = { + limit = { + scope:laamp_temp ?= { + has_perk = personal_touch_perk + landless_inspector_king_of_the_wilds = yes + } + } + multiply = 1.25 + } +} + +gold_refill_value_tt = { + value = 2 + if = { + limit = { + has_perk = cutting_corners_perk + } + multiply = 1.25 + } + if = { + limit = { + has_perk = personal_touch_perk + landless_inspector_king_of_the_wilds = yes + } + multiply = 1.25 + } +} + +replenishable_troops_value = { + value = maa_max_troops_count + subtract = maa_current_troops_count + if = { + limit = { maa_regiments_cost_more_to_reinforce_per_soldier_trigger = yes } + multiply = maa_regiments_cost_more_to_reinforce_per_soldier_trigger_mult + } +} + +replenishable_troops_with_provisions_value = { + value = replenishable_troops_value + max = { + add = scope:current_provisions_max_value_scope + multiply = provision_refill_value + } +} + +replenishable_troops_with_gold_value = { + value = replenishable_troops_value + max = { + add = scope:current_gold_max_value_scope + multiply = gold_refill_value + } +} + +replenishable_troops_max_provisions_value = { + value = 0 + scope:actor = { + every_maa_regiment = { + add = { + add = maa_max_troops_count + subtract = maa_current_troops_count + if = { + limit = { maa_regiments_cost_more_to_reinforce_per_soldier_trigger = yes } + multiply = maa_regiments_cost_more_to_reinforce_per_soldier_trigger_mult + } + } + } + } + max = scope:actor.domicile.provisions + divide = provision_refill_value + multiply = -1 +} + +replenishable_troops_payed_provisions_tt_value = { + value = 0 + every_maa_regiment = { + add = { + add = maa_max_troops_count + subtract = maa_current_troops_count + if = { + limit = { maa_regiments_cost_more_to_reinforce_per_soldier_trigger = yes } + multiply = maa_regiments_cost_more_to_reinforce_per_soldier_trigger_mult + } + } + } + divide = provision_refill_value_tt + max = domicile.provisions +} + +replenishable_troops_max_provisions_tt_value = { + value = 0 + every_maa_regiment = { + add = { + add = maa_max_troops_count + subtract = maa_current_troops_count + } + } + max = { + value = domicile.provisions + multiply = provision_refill_value_tt + } +} + +replenishable_troops_payed_gold_tt_value = { + value = 0 + every_maa_regiment = { + add = { + add = maa_max_troops_count + subtract = maa_current_troops_count + if = { + limit = { maa_regiments_cost_more_to_reinforce_per_soldier_trigger = yes } + multiply = maa_regiments_cost_more_to_reinforce_per_soldier_trigger_mult + } + } + } + divide = gold_refill_value_tt + max = gold +} + +replenishable_troops_max_gold_tt_value = { + value = 0 + every_maa_regiment = { + add = { + add = maa_max_troops_count + subtract = maa_current_troops_count + if = { + limit = { maa_regiments_cost_more_to_reinforce_per_soldier_trigger = yes } + multiply = maa_regiments_cost_more_to_reinforce_per_soldier_trigger_mult + } + } + } + max = { + value = gold + multiply = gold_refill_value_tt + } +} + +replenishable_troops_provision_cost_value = { + value = scope:actor.replenishable_troops_value + max = scope:actor.domicile.max_provisions + multiply = -1 +} + +reinforce_soldiers_regiment_soldiers_value = { + value = reinforce_soldiers_regiment_max_value + min = 1 + max = reinforce_soldiers_max_value +} + +reinforce_soldiers_regiment_max_value = { + value = 25 + if = { + limit = { + scope:actor = { has_perk = soldiers_of_lesser_fortune_perk } + } + multiply = 4 + } +} + +reinforce_soldiers_regiment_max_value_tooltip = { + value = 25 + if = { + limit = { + has_perk = soldiers_of_lesser_fortune_perk + } + multiply = 4 + } +} + +reinforce_soldiers_max_value = { + value = maa_max_troops_count + subtract = maa_current_troops_count +} + +reinforce_soldiers_reinforcable_regiments_value = { + value = 0 + every_maa_regiment = { + limit = { maa_current_troops_count < maa_max_troops_count } + # Cheaper cavalry + if = { + limit = { + OR = { + is_unit_type = light_cavalry + is_unit_type = heavy_cavalry + } + regiment_owner.domicile ?= { has_domicile_parameter = camp_cheaper_cavalry_reinforcement } + } + add = 0.5 + } + else = { add = 1 } + } + min = 0.5 +} + +reinforce_soldiers_reinforcable_regiments_undiscounted_value = { + value = 0 + every_maa_regiment = { + limit = { maa_current_troops_count < maa_max_troops_count } + add = 1 + } + min = 1 +} + +reinforce_soldiers_gold_value = { + value = minor_gold_value + if = { + limit = { + domicile ?= { has_domicile_parameter = camp_improved_reinforcement_from_gold } + } + multiply = 0.5 + } + multiply = reinforce_soldiers_reinforcable_regiments_value +} + +reinforce_soldiers_dread_cost_value = { + value = 5 + if = { + limit = { + scope:actor.domicile = { has_domicile_parameter = camp_improved_entice_local_mercenaries } + } + add = -2.5 + } + multiply = reinforce_soldiers_reinforcable_regiments_value +} + +small_empire_size_value = 75 +large_empire_size_value = 125 + +current_size_empire_value = { add = root.realm_size } + +laamp_improved_learning_contract_success_value = 20 # Update parameter tooltip if this is changed! + +laamp_improved_tracker_contract_success_value = 20 # Update parameter tooltip if this is changed! + +# Currently this define is set to 100, so adjust with that in mind. +provisions_privation_threshold_start = { value = define:NCharacter|PROVISIONS_LOW_WARNING } +provisions_privation_threshold_low = 66 +provisions_privation_threshold_very_low = 33 +provisions_privation_threshold_empty = 0 + +gather_provisions_forage_base_value = { + # TERRAIN + if = { + limit = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = taiga + } + } + add = 100 + } + else_if = { + limit = { + NOT = { + root = { has_perk = golden_aplomb_perk } + } + 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 = 25 + } + if = { + limit = { has_building_or_higher = orchards_01 } + add = 25 + } + if = { + limit = { has_building_or_higher = farm_estates_01 } + add = 25 + } + if = { + limit = { has_building_or_higher = cereal_fields_01 } + add = 25 + } + if = { + limit = { has_building_or_higher = plantations_01 } + add = 25 + } + if = { + limit = { has_building_or_higher = hill_farms_01 } + add = 25 + } + # 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 + } + min = 50 + # We deliberately apply this after the min, since it's a global boost. + if = { + limit = { + root.domicile = { has_domicile_parameter = camp_improves_gather_provisions_hunting } + } + multiply = camp_improves_gather_provisions_hunting_value + } + if = { + limit = { + root = { has_perk = it_is_my_domain_perk } + } + multiply = 1.25 + } + if = { # Inspector Lifestyle Perk + limit = { + landless_inspector_terrain_knowing_the_land_trigger = yes + root = { has_perk = know_your_land_know_your_people_perk } + } + multiply = 1.5 + } +} +# Parameter improvements from camp buildings. +camp_improves_gather_provisions_hunting_value = 1.5 +camp_improves_gather_provisions_hunting_loc_value = { + value = camp_improves_gather_provisions_hunting_value + add = -1 +} + +gather_provisions_hunt_base_value = { + value = 50 + # TERRAIN + if = { + limit = { + OR = { + terrain = farmlands + terrain = floodplains + terrain = wetlands + } + } + add = 100 + } + else_if = { + limit = { + NOT = { + root = { has_perk = golden_aplomb_perk } + } + OR = { + terrain = desert + terrain = desert_mountains + terrain = mountains + terrain = taiga + terrain = steppe + } + } + add = 250 + } + else = { add = 500 } + # HOLDING + if = { + limit = { has_holding = no } + add = 50 + } + # BUILDINGS + if = { + limit = { has_building_or_higher = hunting_grounds_01 } + add = 50 + } + if = { + limit = { has_building_or_higher = royal_forest_01 } + add = 100 + } + min = 5 + # We deliberately apply this after the min, since it's a global boost. + if = { + limit = { + root.domicile = { has_domicile_parameter = camp_improves_gather_provisions_foraging } + } + multiply = camp_improves_gather_provisions_foraging_value + } + if = { + limit = { + root = { has_perk = it_is_my_domain_perk } + } + multiply = 1.25 + } +} +# Parameter improvements from camp buildings. +camp_improves_gather_provisions_foraging_value = 1.5 +camp_improves_gather_provisions_foraging_loc_value = { + value = camp_improves_gather_provisions_foraging_value + add = -1 +} + +provisions_low_value = 10 + +adventurers_make_local_deals_option_value = { + value = 0 + if = { + limit = { root.current_travel_plan.current_location.available_loot > 0 } + add = root.current_travel_plan.current_location.available_loot + divide = 4 + } +} + +strong_governor_military_value = { + value = 0 + add = scope:emperor.max_military_strength + multiply = 0.2 +} + +ep3_emperors_war_strength_value = { + value = 0 + if = { + limit = { + scope:emperor = { + is_defender_in_war = scope:war + } + } + scope:war = { + every_war_defender = { + add = current_military_strength + } + } + } + else = { + scope:war = { + every_war_attacker = { + add = current_military_strength + } + } + } +} + +ep3_emperors_war_strength_double_value = { + value = 0 + if = { + limit = { + scope:emperor = { + is_defender_in_war = scope:war + } + } + scope:war = { + every_war_defender = { + add = current_military_strength + } + } + } + else = { + scope:war = { + every_war_attacker = { + add = current_military_strength + } + } + } + multiply = 2 +} + +ep3_emperors_foe_war_strength_value = { + value = 0 + if = { + limit = { + scope:emperor = { + is_defender_in_war = scope:war + } + } + scope:war = { + every_war_attacker = { + add = current_military_strength + } + } + } + else = { + scope:war = { + every_war_defender = { + add = current_military_strength + } + } + } +} + +ep3_emperors_foe_war_strength_double_value = { + value = 0 + if = { + limit = { + scope:emperor = { + is_defender_in_war = scope:war + } + } + scope:war = { + every_war_attacker = { + add = current_military_strength + } + } + } + else = { + scope:war = { + every_war_defender = { + add = current_military_strength + } + } + } + multiply = 2 +} + +ep3_governor_yearly_3050_regiment_size_value = { + value = 0 + scope:regiment = { + add = maa_size + } +} + +provisions_threshold_critical_low_value = { value = define:NCharacter|PROVISIONS_LOW_WARNING } #Will literally throw a warning in the UI if provisions go beneath this + +provisions_threshold_low_value = { + value = max_provisions + multiply = 0.2 +} +provisions_threshold_mid_value = { + value = max_provisions + multiply = 0.5 +} +provisions_threshold_good_value = { + value = max_provisions + multiply = 0.8 +} + +ep3_legacy_domicile_artifact_counter_illustrious_score = { + value = var:ep3_legacy_domicile_artifact_counter_illustrious + multiply = 4 +} +ep3_legacy_domicile_artifact_counter_famed_score = { + value = var:ep3_legacy_domicile_artifact_counter_famed + multiply = 3 +} +ep3_legacy_domicile_artifact_counter_masterwork_score = { + value = var:ep3_legacy_domicile_artifact_counter_masterwork + multiply = 2 +} +ep3_legacy_domicile_artifact_counter_common_score = { + value = var:ep3_legacy_domicile_artifact_counter_common + multiply = 1 +} +cabinet_of_curiosities_artifact_score = { + value = 0 + if = { + limit = { has_variable = ep3_legacy_domicile_artifact_counter_illustrious } + add = ep3_legacy_domicile_artifact_counter_illustrious_score + } + if = { + limit = { has_variable = ep3_legacy_domicile_artifact_counter_famed } + add = ep3_legacy_domicile_artifact_counter_famed_score + } + if = { + limit = { has_variable = ep3_legacy_domicile_artifact_counter_masterwork } + add = ep3_legacy_domicile_artifact_counter_masterwork_score + } + if = { + limit = { has_variable = ep3_legacy_domicile_artifact_counter_common } + add = ep3_legacy_domicile_artifact_counter_common_score + } +} + +latin_emp_army_levies_value = { + value = 100 + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + add = 100 + } + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + add = 200 + } + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = 200 + } +} + +latin_emp_army_maa_value = { + value = 1 + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + add = 1 + } + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + add = 1 + } + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = 1 + } +} + +boost_efficiency_maximum_value = 40 +damage_efficiency_minimum_value = -40 +efficiency_interaction_cooldown_years_value = 5 +efficiency_interaction_change_value = 4 + +ep3_governor_yearly_3070_governorship_value = { + value = 0 + every_sub_realm_county = { + add = 1 + } +} + +ep3_found_despotate_control_total_value = { + value = 0 + primary_title.kingdom = { + every_de_jure_county = { add = 1 } + } +} + +ep3_found_despotate_control_held_value = { + value = 0 + save_temporary_scope_as = holder_temp + primary_title.kingdom = { + every_de_jure_county = { + limit = { + county_held_or_vassal_to_target_trigger = { TARGET = scope:holder_temp } + } + add = 1 + } + } +} + +ep3_found_despotate_control_percent_value = { + value = ep3_found_despotate_control_held_value + divide = ep3_found_despotate_control_total_value + multiply = 100 +} + +military_strength_25_percent_value = { + value = current_military_strength + multiply = 0.25 +} + +military_strength_75_percent_value = { + value = current_military_strength + multiply = 0.75 +} + +number_of_counties_with_heresy_1 = { + value = 0 + top_liege = { + every_realm_county = { + limit = { + faith = scope:heresy_1 + } + add = 1 + } + } +} + +number_of_counties_with_heresy_2 = { + value = 0 + top_liege = { + every_realm_county = { + limit = { + faith = scope:heresy_2 + } + add = 1 + } + } +} + +number_of_counties_with_heresy_3 = { + value = 0 + top_liege = { + every_realm_county = { + limit = { + faith = scope:heresy_3 + } + add = 1 + } + } +} + +number_of_counties_with_heresy_acceptance = { + value = 0 + every_realm_county = { + limit = { + faith = scope:heresy + } + add = 10 + } +} + +number_of_vassals_with_heresy_acceptance = { + value = 0 + every_vassal = { + limit = { + faith = scope:heresy + } + add = 5 + } +} + +influence_difference_value = { + value = scope:heretic.influence + subtract = root.influence + multiply = 0.1 +} + +architect_aptitude_scale_value = { + value = 1 + multiply = root.court_position:royal_architect_court_position.aptitude:royal_architect_court_position +} + +ep3_actor_governor_trait_level_value = { + value = -1 + scope:actor ?= { + if = { + limit = { has_trait = governor } + add = 1 + } + if = { + limit = { has_trait_xp = { trait = governor value >= 25 } } + add = 1 + } + if = { + limit = { has_trait_xp = { trait = governor value >= 50 } } + add = 1 + } + if = { + limit = { has_trait_xp = { trait = governor value >= 75 } } + add = 1 + } + if = { + limit = { has_trait_xp = { trait = governor value >= 100 } } + add = 1 + } + } +} + +ep3_recipient_governor_trait_level_value = { + value = -1 + scope:recipient ?= { + if = { + limit = { has_trait = governor } + add = 1 + } + if = { + limit = { has_trait_xp = { trait = governor value >= 25 } } + add = 1 + } + if = { + limit = { has_trait_xp = { trait = governor value >= 50 } } + add = 1 + } + if = { + limit = { has_trait_xp = { trait = governor value >= 75 } } + add = 1 + } + if = { + limit = { has_trait_xp = { trait = governor value >= 100 } } + add = 1 + } + } +} + +ep3_actor_recipient_governor_trait_level_diff_value = { + value = ep3_actor_governor_trait_level_value + subtract = ep3_recipient_governor_trait_level_value +} + +event_troops_ep3_separatist_scale_value = { + value = 100 + multiply = { + value = root.location.duchy.holder.primary_title.tier + } +} + +hostile_scheme_variable_list_value = { + value = 0 + scope:owner = { + every_in_list = { + variable = supporting_hostile_schemes + add = 5 + } + } +} + + + +personal_scheme_variable_list_value = { + value = 0 + scope:owner = { + every_in_list = { + variable = supporting_personal_schemes + add = 5 + } + } +} + +political_scheme_variable_list_value = { + value = 0 + scope:owner = { + every_in_list = { + variable = supporting_political_schemes + add = 5 + } + } +} + +hostile_scheme_base_bonus_per_character = 5 +personal_scheme_base_bonus_per_character = 5 +political_scheme_base_bonus_per_character = 5 + +# Laamps above this count must be exceptional characters or of interest to the player. +## This is because there are various things they do that are _fairly_ unperformant, so it's important that we put a good soft-cap on their numbers to stop them growing out of control and tanking performance. +### Code decisions were made assuming that there would be _maybe_ 200 on the map in the late game, give or take ~50. +#### More than that will work mechanically but prepare for substantial frame rate drops. +max_desired_laamps_value = { + value = 200 + switch = { + trigger = has_game_rule + ai_laamp_numbers_25 = { value = 25 } + ai_laamp_numbers_50 = { value = 50 } + ai_laamp_numbers_100 = { value = 100 } + ai_laamp_numbers_150 = { value = 150 } + ai_laamp_numbers_200 = { value = 200 } + } +} + +seventyfive_percent_of_max_desired_laamps_value = { + value = max_desired_laamps_value + multiply = 0.75 +} + +too_many_laamps_value = { + value = max_desired_laamps_value + switch = { + trigger = has_game_rule + ai_laamp_numbers_25 = { add = 2 } + ai_laamp_numbers_50 = { add = 5 } + ai_laamp_numbers_100 = { add = 10 } + ai_laamp_numbers_150 = { add = 15 } + ai_laamp_numbers_200 = { add = 20 } + } +} + +wipe_slate_min_xp_to_remove_trait_value = 5 +crusader_absolution_min_xp_to_remove_trait_value = 25 +crusader_absolution_xp_removed_per_track_value = { + value = 100 + subtract = crusader_absolution_min_xp_to_remove_trait_value + multiply = -1 +} + +camp_party_province_reference_value = { + value = 15 +} + +amount_of_followers_value = { + value = 0 + every_courtier = { + add = 1 + } +} + +current_camp_temperament_average_value = { + value = 0 + every_courtier = { + add = "opinion(root)" + } + divide = amount_of_followers_value +} + +low_camp_temperament_value = define:NDomicile|TEMPERAMENT_THRESHOLD_LOW +high_camp_temperament_value = define:NDomicile|TEMPERAMENT_THRESHOLD_HIGH + +default_temperament_high_value_scale = { + value = prestige_level + if = { + limit = { + has_perk = absolute_control_perk + } + add = { + value = dread + divide = 20 + } + } + if = { + limit = { + has_perk = honored_to_serve_perk + } + add = { + every_courtier = { + add = 1 + } + divide = 5 + min = 0 + } + } + if = { + limit = { + has_perk = scientific_perk + } + add = { + every_courtier = { + limit = { + learning >= 15 + } + add = 1 + } + min = 0 + } + } + if = { + limit = { + has_perk = gracious_host_impeccable_guest_perk + } + add = num_of_known_languages + } +} + +default_temperament_low_value_scale = { + value = prestige_level +} + +estate_increase_gardener_aptitude_value_1 = 10 +estate_increase_gardener_aptitude_value_2 = 15 + +estate_increased_personal_scheme_success_1_value = 5 +estate_increased_personal_scheme_success_2_value = 15 +estate_increased_personal_scheme_success_3_value = 25 + +kennels_more_successful_hunts_1_value = 10 +kennels_more_successful_hunts_2_value = 15 + +cultivated_sophistication_development_gain = minor_development_progress_gain + +slander_appointment_score_value = -25 +slander_acclamation_score_value = -50 + +promote_appointment_score_value = 20 +promote_acclamation_score_value = 30 + +ep3_requested_faith_support_0_value = { + value = major_influence_gain +} +ep3_requested_faith_support_1_value = { + value = ep3_requested_faith_support_0_value + multiply = 1.5 +} +ep3_requested_faith_support_2_value = { + value = ep3_requested_faith_support_0_value + multiply = 2 +} +ep3_requested_faith_support_3_value = { + value = ep3_requested_faith_support_0_value + multiply = 2.5 +} +ep3_requested_faith_support_4_value = { + value = ep3_requested_faith_support_0_value + multiply = 3 +} +ep3_requested_faith_support_5_value = { + value = ep3_requested_faith_support_0_value + multiply = 3.5 +} +ep3_requested_faith_support_6_value = { + value = ep3_requested_faith_support_0_value + multiply = 4 +} + +chancellor_integrate_title_admin_top_liege_bonus = 1 +chancellor_integrate_title_admin_target_bonus = 0.5 + +de_jure_governor_bonus = -20 + +greek_anarchy_army_levy_value = { + value = 50 + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + add = 100 + } + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = 100 + } + if = { + limit = { + scope:defender = { + highest_held_title_tier >= tier_duchy + } + } + add = 150 + } + if = { + limit = { + scope:defender = { + highest_held_title_tier >= tier_kingdom + } + } + add = 200 + } + if = { + limit = { + scope:defender = { + highest_held_title_tier >= tier_empire + } + } + add = 200 + } +} + +greek_anarchy_army_weak_maa_value = { + value = 1 + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + add = 1 + } + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = 2 + } + if = { + limit = { + scope:defender = { + highest_held_title_tier >= tier_duchy + } + } + add = 1 + } + if = { + limit = { + scope:defender = { + highest_held_title_tier >= tier_kingdom + } + } + add = 2 + } + if = { + limit = { + scope:defender = { + highest_held_title_tier >= tier_empire + } + } + add = 1 + } +} + +greek_anarchy_army_maa_value = { + value = 1 + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = 2 + } + if = { + limit = { + scope:defender = { + highest_held_title_tier >= tier_duchy + } + } + add = 1 + } + if = { + limit = { + scope:defender = { + highest_held_title_tier >= tier_kingdom + } + } + add = 1 + } +} + +greek_anarchy_army_heavy_cav_value = { + value = 0 + if = { + limit = { + culture = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + add = 1 + } + if = { + limit = { + scope:defender = { + highest_held_title_tier >= tier_duchy + } + } + add = 1 + } + if = { + limit = { + scope:defender = { + highest_held_title_tier >= tier_empire + } + } + add = 1 + } +} + +greek_anarchy_development_value = -50 + +faction_power_existing_threshold_value = { + value = faction_power + multiply = 2 +} + +ep3_invite_to_faction_war_strength_compare_defender_value = { + value = 0 + every_war_defender = { add = current_military_strength } +} + +ep3_invite_to_faction_war_strength_compare_attacker_value = { + value = 0 + every_war_attacker = { add = current_military_strength } +} + +admin_convert_influence_value = { + value = 0 + if = { + limit = { + has_character_flag = latin_emp_force_admin_flag + } + add = major_influence_gain + } + else = { + add = monumental_influence_gain + } +} + +admin_convert_legitimacy_value = { + value = 0 + if = { + limit = { + has_character_flag = latin_emp_force_admin_flag + } + add = minor_legitimacy_gain + } + else = { + add = medium_legitimacy_gain + } +} + +chance_to_be_educated_while_educating_value = { + value = 2.5 + if = { + limit = { has_perk = learn_on_the_job_perk } + multiply = 2 + } +} + +learning_task_contract_qualified_score_value = 1 +learning_task_contract_medium_score_value = 2 +learning_task_contract_major_score_value = 3 + +laamp_base_contract_schemes_2661_modifier_duration_value = { + value = 5 + if = { + limit = { + root = { is_ai = no } + } + add = 20 + } +} + +rebuke_roman_revanchism_sicily_requirements_no_ere_county_value = 10 +rebuke_roman_revanchism_sicily_requirements_some_ere_county_value = 13 +rebuke_roman_revanchism_sicily_requirements_no_ere_in_italy_county_value = 5 +rebuke_roman_revanchism_sicily_fame_reward_value = 1000 + +# How many provisions do we give out per modifier removed? +butcher_animals_decision_cat_provision_value = 50 +butcher_animals_decision_dog_provision_value = 75 +butcher_animals_decision_dog_building_provision_value = 750 +butcher_animals_decision_horse_provision_value = 150 +butcher_animals_decision_horse_building_provision_value = 1250 +butcher_animals_decision_elephant_building_provision = 2500 + +# How long before you can rebuild buildings/sacrifice the animals again? +butcher_animals_decision_regular_cooldown_value = 25 +butcher_animals_decision_elephant_cooldown_value = 50 + +add_camp_officer_aptitude_value = { + if = { + limit = { has_court_position = second_camp_officer } + add = "aptitude(second_camp_officer)" + } + else_if = { + limit = { has_court_position = quartermaster_camp_officer } + add = "aptitude(quartermaster_camp_officer)" + } + else_if = { + limit = { has_court_position = armorer_camp_officer } + add = "aptitude(armorer_camp_officer)" + } + else_if = { + limit = { has_court_position = chief_forager_camp_officer } + add = "aptitude(chief_forager_camp_officer)" + } + else_if = { + limit = { has_court_position = master_thief_camp_officer } + add = "aptitude(master_thief_camp_officer)" + } + else_if = { + limit = { has_court_position = head_porter_camp_officer } + add = "aptitude(head_porter_camp_officer)" + } + else_if = { + limit = { has_court_position = head_groom_camp_officer } + add = "aptitude(head_groom_camp_officer)" + } + else_if = { + limit = { has_court_position = huntperson_camp_officer } + add = "aptitude(huntperson_camp_officer)" + } + else_if = { + limit = { has_court_position = kennelperson_camp_officer } + add = "aptitude(kennelperson_camp_officer)" + } + else_if = { + limit = { has_court_position = chief_engineer_camp_officer } + add = "aptitude(chief_engineer_camp_officer)" + } + else_if = { + limit = { has_court_position = witness_camp_officer } + add = "aptitude(witness_camp_officer)" + } + else_if = { + limit = { has_court_position = person_haggler_camp_officer } + add = "aptitude(person_haggler_camp_officer)" + } + else_if = { + limit = { has_court_position = camp_cook_camp_officer } + add = "aptitude(camp_cook_camp_officer)" + } + else_if = { + limit = { has_court_position = master_bard_camp_officer } + add = "aptitude(master_bard_camp_officer)" + } + else_if = { + limit = { has_court_position = stooge_camp_officer } + add = "aptitude(stooge_camp_officer)" + } + else_if = { + limit = { has_court_position = master_of_arms_camp_officer } + add = "aptitude(master_of_arms_camp_officer)" + } + else_if = { + limit = { has_court_position = light_cavalry_captain_camp_officer } + add = "aptitude(light_cavalry_captain_camp_officer)" + } + else_if = { + limit = { has_court_position = camelry_captain_camp_officer } + add = "aptitude(camelry_captain_camp_officer)" + } + else_if = { + limit = { has_court_position = elephantry_captain_camp_officer } + add = "aptitude(elephantry_captain_camp_officer)" + } + else_if = { + limit = { has_court_position = heavy_cavalry_captain_camp_officer } + add = "aptitude(heavy_cavalry_captain_camp_officer)" + } + else_if = { + limit = { has_court_position = horse_archer_captain_camp_officer } + add = "aptitude(horse_archer_captain_camp_officer)" + } + else_if = { + limit = { has_court_position = archer_captain_camp_officer } + add = "aptitude(archer_captain_camp_officer)" + } + else_if = { + limit = { has_court_position = heavy_infantry_captain_camp_officer } + add = "aptitude(heavy_infantry_captain_camp_officer)" + } + else_if = { + limit = { has_court_position = light_infantry_captain_camp_officer } + add = "aptitude(light_infantry_captain_camp_officer)" + } + else_if = { + limit = { has_court_position = pike_captain_camp_officer } + add = "aptitude(pike_captain_camp_officer)" + } + else_if = { + limit = { has_court_position = master_of_spoils_camp_officer } + add = "aptitude(master_of_spoils_camp_officer)" + } + else_if = { + limit = { has_court_position = laureate_camp_officer } + add = "aptitude(laureate_camp_officer)" + } + else_if = { + limit = { has_court_position = camp_priest_camp_officer } + add = "aptitude(camp_priest_camp_officer)" + } +} + +laamp_base_contract_schemes_1301_maa_damage_catastrophic_value = -0.6 +laamp_base_contract_schemes_1301_maa_damage_heavy_value = -0.45 +laamp_base_contract_schemes_1301_maa_damage_moderate_value = -0.3 +laamp_base_contract_schemes_1301_maa_damage_light_value = -0.2 + +# Thomas Aquinas was born in 1225, more or less +ep3_thomas_aquinas_age_value = { + value = current_year + add = -1225 +} + +ep3_interactions_events_0500_troops_count_value = 100 + +ep3_adventurer_ai_contracts_per_employer_max_value = 3 +ep3_adventurer_ai_contracts_per_employer_min_value = 1 +ep3_adventurer_ai_employers_per_kingdom_max_value = 8 +ep3_adventurer_ai_employers_per_kingdom_min_value = 4 + +procure_estate_interaction_cost_base_gold = 1000 +procure_estate_interaction_cost_base_prestige = 2000 +procure_estate_interaction_cost_base_piety = 1000 + +request_co_emperor_interaction_gold_cost_value = { value = monumental_gold_value } +request_co_emperor_interaction_influence_cost_value = { + value = monumental_influence_value + multiply = 2 +} + +see_how_its_done_gold_reward_value = { + value = 20 + multiply = been_there_done_that_check_multiplier_value +} + +visit_settlement_paid_training_value = { + value = 0 + if = { + limit = { prowess < low_skill_rating } + value = tiny_gold_laamps_value + } + else_if = { + limit = { prowess < mediocre_skill_rating } + value = minor_gold_laamps_value + } + else_if = { + limit = { prowess < decent_skill_rating } + value = medium_gold_laamps_value + } + else_if = { + limit = { prowess < high_skill_rating } + value = major_gold_laamps_value + } + else_if = { + limit = { prowess < extremely_high_skill_rating } + value = massive_gold_laamps_value + divide = 2 + } + else = { + value = massive_gold_laamps_value + } +} + +harrying_miniscule_increase_value = 0.3 +harrying_minor_increase_value = 0.5 +harrying_medium_increase_value = 1 + +laamp_marriable_women_value = { + if = { + limit = { laamp_request_likely_marriable_woman_trigger = yes } + add = 1 + } + every_courtier = { + limit = { laamp_request_likely_marriable_woman_trigger = yes } + add = 1 + } +} + +laamp_marriable_women_realistic_value = { + every_courtier = { + limit = { + laamp_request_likely_marriable_woman_trigger = yes + NOR = { + is_close_family_of = root + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + is_councillor_of = root + is_concubine_of = root + } + } + add = 1 + } +} + +laamp_marriable_men_value = { + if = { + limit = { laamp_request_likely_marriable_man_trigger = yes } + add = 1 + } + every_courtier = { + limit = { laamp_request_likely_marriable_man_trigger = yes } + add = 1 + } +} + +laamp_marriable_men_realistic_value = { + every_courtier = { + limit = { + laamp_request_likely_marriable_man_trigger = yes + NOR = { + is_close_family_of = root + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + is_councillor_of = root + is_concubine_of = root + } + } + add = 1 + } +} + +laamp_city_construction_year_value = { + value = scope:year_of_construction + add = 100 +} diff --git a/common/script_values/08_bp3_values.txt b/common/script_values/08_bp3_values.txt new file mode 100644 index 00000000..eea3345a --- /dev/null +++ b/common/script_values/08_bp3_values.txt @@ -0,0 +1,204 @@ +wayfarer_the_real_threat_value = { + value = 1 + if = { + limit = { is_landed = yes } + add = { + add = 100 + multiply = primary_title.tier + } + } + if = { + limit = { has_relation_rival = root } + add = 100 + } + if = { + limit = { is_close_family_of = root } + add = 100 + } + if = { + limit = { has_any_court_position = yes } + add = 10 + } +} + +max_regiment_count_plus_one = { + value = maa_regiments_max_count + add = 1 +} + +battle_poi_number_value = { + value = 3500 + if = { + limit = { + current_year > 1400 + } + multiply = 6 + } + else_if = { + limit = { + current_year > 1300 + } + multiply = 5 + } + else_if = { + limit = { + current_year > 1200 + } + multiply = 4 + } + else_if = { + limit = { + current_year > 1100 + } + multiply = 3 + } + else_if = { + limit = { + current_year > 1000 + } + multiply = 2 + } +} + +inspection_levy_reward_value = { + value = 150 + multiply = { + value = root.highest_held_title_tier + subtract = 1 + } + multiply = { + value = current_year + subtract = 900 + divide = 100 + floor = yes + } + min = 100 + max = 2000 +} + +extra_building_resources_value = { + value = 0 + + if = { + limit = { + has_variable = extra_building_resources + } + add = var:extra_building_resources + } + min = 1 + + desc = MODIFIER_DEFINITION_EXTRA_BUILDING_RESOURCES +} + +court_brewmaster_multiplier = { + value = 1 + + if = { + limit = { + any_court_position_holder = { + type = court_brewmaster_court_position + aptitude = { + court_position = court_brewmaster_court_position + value >= 4 + } + } + } + multiply = 1.25 + } + else_if = { + limit = { + any_court_position_holder = { + type = court_brewmaster_court_position + aptitude = { + court_position = court_brewmaster_court_position + value >= 3 + } + } + } + multiply = 1.2 + } + else_if = { + limit = { + any_court_position_holder = { + type = court_brewmaster_court_position + aptitude = { + court_position = court_brewmaster_court_position + value >= 2 + } + } + } + multiply = 1.15 + } + else_if = { + limit = { + any_court_position_holder = { + type = court_brewmaster_court_position + aptitude = { + court_position = court_brewmaster_court_position + value >= 1 + } + } + } + multiply = 1.1 + } + else_if = { + limit = { + any_court_position_holder = { + type = court_brewmaster_court_position + } + } + multiply = 1.05 + } +} + +brewery_counter_value = { + value = current_year + + scope:brewery_county ?= { + subtract = var:brewery_counter_var + } +} + +brewery_counter_25 = { + value = current_year + subtract = var:brewery_counter_var + + divide = 25 + floor = yes + multiply = 25 +} + +church_investment_value = { + value = current_year + + subtract = var:church_investment_year_var + + divide = 2 + ceiling = yes + min = 1 + + desc = MODIFIER_DEFINITION_CHURCH_INVESTMENTS +} + +of_the_people_perk_value = { + value = 0 + add = diplomacy + multiply = 10 + min = 50 +} + +bosporan_kingdom_modifier_scale_value = { + value = 1 + every_house_member = { + every_held_title = { + limit = { + tier = tier_county + title_province = { geographical_region = black_sea_coast_region } + } + add = 1 + } + } + max = 15 + + desc = MODIFIER_DEFINITION_BOSPORAN_KINGDOM +} diff --git a/common/script_values/10_health_values.txt b/common/script_values/10_health_values.txt new file mode 100644 index 00000000..3c374e34 --- /dev/null +++ b/common/script_values/10_health_values.txt @@ -0,0 +1,756 @@ +# Dependencies: +# _basic_values.txt + +# When their health drop too low and they're slated for death, a character will die within 15-50 days (based on DEATH_MAXIMUM_DELAY , DEATH_MINIMUM_DELAY and DEATH_CHECK_INTERVAL in defines) + +###################### +# Diseases +###################### + +#### TREATMENT PROCESS SPEED ### +#The speed should most likely be under the minimum delay between health check and death DEATH_MINIMUM_DELAY (15) + +court_physician_search_min = 7 +court_physician_search_max = 10 + +physician_treatment_delay_ruler_min = 2 +physician_treatment_delay_ruler_max = 4 +physician_treatment_delay_subject_min = 6 #Subject span should be after ruler span so ruler's own treatment is always first +physician_treatment_delay_subject_max = 15 + + +### RECOVERY TIMES ### +minimum_recovery_time = 51 #Needs to be higher than 50 (the longest amount of days between health change and death, so that a character can't recover before they're slated to be checked for death) + +ill_recovery_min = minimum_recovery_time +ill_recovery_max = 365 + +pneumonic_recovery_min = minimum_recovery_time +pneumonic_recovery_max = 250 + +gout_ridden_recovery_min = { #1 year + value = minimum_recovery_time + add = 314 +} +gout_ridden_recovery_max = 10950 #30 years + +smallpox_min_recovery_time = minimum_recovery_time +smallpox_max_recovery_time = 150 + +bubonic_plague_min_recovery_time = minimum_recovery_time +bubonic_plague_max_recovery_time = 150 + +measles_min_recovery_time = minimum_recovery_time +measles_max_recovery_time = 100 + +dysentery_min_recovery_time = minimum_recovery_time +dysentery_max_recovery_time = 100 + +ergotism_min_recovery_time = minimum_recovery_time +ergotism_max_recovery_time = 150 + +### CONTAGION ### +smallpox_contagion_min = 15 #If there is a physician, the character should be likely to meet them before first spread +smallpox_contagion_max = 65 + +bubonic_plague_contagion_min = 15 #If there is a physician, the character should be likely to meet them before first spread +bubonic_plague_contagion_max = 45 #Shorter than smallpox because you die faster + + + +physician_contagion_prevention_value = { + add = physician_base_skill_factor #Between 1 for average skill and 3 for high skill + if = { + limit = { + AND = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + } + multiply = 2 + } + else_if = { + limit = { + OR = { + AND = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 50 + } + } + AND = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 100 + } + } + } + } + multiply = 1.5 + } + else_if = { + limit = { + OR = { + has_trait = lifestyle_physician + AND = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 50 + } + } + has_trait = lifestyle_herbalist + } + } + multiply = 1.3 + } + else_if = { + limit = { + has_trait = lifestyle_mystic + } + multiply = 1.1 + } + max = 7.5 +} + + + +##################### +# Treatments +##################### + + + + +###################### +# Court Physician +###################### + +high_skill_court_physician_cost = { + value = medium_gold_value + if = { + limit = { + has_perk = anatomical_studies_perk + } + multiply = 0.5 + } +} + +low_skill_court_physician_cost = { + value = minor_gold_value + if = { + limit = { + has_perk = anatomical_studies_perk + } + multiply = 0.5 + } +} + +physician_base_skill_factor = { + # 1 for an average learning skill character without traits + # 0.2 min for low learning + # ~3 for high skill character without traits + add = learning + divide = average_skill_rating #At average skill rating, we have a factor of 1 + if = { + limit = { learning >= high_skill_rating } #At high skill rating, they become 30% better + multiply = 1.3 + } + min = 0.2 +} + + + +physician_safe_treatment_skill_factor = { + # 1 for an average learning skill character without traits + # 0.2 min for low learning + # ~3 for high skill character without traits + # ~12 for high skill character with best trait (physician_3) + + value = physician_base_skill_factor + + if = { + limit = { + AND = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + } + multiply = 4 + } + else_if = { + limit = { + OR = { + AND = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 50 + } + } + AND = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 100 + } + } + } + } + multiply = 2 + } + else_if = { + limit = { + OR = { + has_trait = lifestyle_physician + AND = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 50 + } + } + has_trait = lifestyle_herbalist + } + } + multiply = 1.5 + } + else_if = { + limit = { + has_trait = lifestyle_mystic + } + multiply = 1.2 + } + if = { + limit = { + liege ?= { + domicile ?= { + has_domicile_building_or_higher = bath_04 + } + } + } + multiply = 1.4 + } + else_if = { + limit = { + liege ?= { + domicile ?= { + has_domicile_building_or_higher = bath_01 + } + } + } + multiply = 1.2 + } + if = { + limit = { + exists = liege + liege = { has_perk = anatomical_studies_perk } + } + multiply = 2 + } +} + + + + +################# +# Weight +################ +#These values are used to calculate the target weight that characters will trend towards once every three years + +underweight_threshold = 0 +overweight_threshold = 0 + +feast_weight_modifier_value = { + add = 5 + # You have a lot of very desirable food + if = { + limit = { + scope:activity.activity_host = { + has_royal_court = yes + has_dlc_feature = royal_court + amenity_level = { + type = court_food_quality + value >= 5 + } + } + } + add = 3 + } + # You have a lot of food in general + else_if = { + limit = { + scope:activity.activity_host = { + has_royal_court = yes + has_dlc_feature = royal_court + amenity_level = { + type = court_food_quality + value >= 3 + } + } + } + add = 2 + } + # It's a smaller amount of food, but it's still a feast + else_if = { + limit = { + scope:activity.activity_host = { + has_royal_court = yes + has_dlc_feature = royal_court + amenity_level = { + type = court_food_quality + value <= 1 + } + } + } + add = -1 + } +} +hunt_weight_modifier_value = -4 +cake_shaft_modifier_value = 4 + +character_weight_base_value = { + add = 0 + #Any modifiers that will affect weight? + if = { + limit = { + is_ai = yes # Players gaining weight is handled through health.5004 + has_character_modifier = gaining_weight_modifier + } + add = 35 + } + if = { + limit = { + is_ai = yes # Players losing weight is handled through health.5005 + has_character_modifier = losing_weight_modifier + } + add = -35 + } + if = { + limit = { + has_character_modifier = fasting_bad_modifier + } + add = -10 + } + + #Do you have a food taster? For some reason your plate is always weirdly empty since you employed them... + if = { + limit = { + employs_court_position = food_taster_court_position + } + add = -5 + } + + #Any activities attended/other things that will affect weight? + if = { + limit = { + has_variable = character_weight_variable + } + add = var:character_weight_variable + } + + # PRISON/STARVATION + if = { + limit = { + is_imprisoned = yes + } + if = { + limit = { + is_in_prison_type = dungeon + } + add = -75 + } + else = { + add = -30 + } + } + + # DISEASE + if = { + limit = { + has_trait = consumption + } + add = -75 + } + if = { + limit = { + has_trait = cancer + } + add = -50 + } + if = { + limit = { + has_trait = great_pox + } + add = -35 + } + if = { + limit = { + has_trait = leper + } + add = -15 + } + + # Court amenities, weight gain from court_food_quality + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + court_owner = { + amenity_level = { type = court_food_quality value = 3 } + } + } + add = 3 + } + else_if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + court_owner = { + amenity_level = { type = court_food_quality value = 4 } + } + } + add = 5 + } + else_if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + court_owner = { + amenity_level = { type = court_food_quality value = 5 } + } + } + add = 7 + } + + ######## + #Trait check + ######## + #ADD + if = { + limit = { has_trait = gluttonous } + add = 50 + } + if = { + limit = { has_trait = comfort_eater } + add = 25 + } + if = { + limit = { has_trait = drunkard } + add = 20 + } + if = { + limit = { has_trait = hashishiyah } + add = 20 + } + if = { + limit = { has_trait = lazy } + add = 10 + } + if = { + limit = { has_trait = greedy } + add = 10 + } + if = { + limit = { has_trait = calm } + add = 10 + } + if = { + limit = { has_trait = trusting } + add = 10 + } + if = { + limit = { has_trait = gregarious } + add = 10 + } + if = { + limit = { has_trait = patient } + add = 5 + } + if = { + limit = { has_trait = arrogant } + add = 5 + } + if = { + limit = { has_trait = ambitious } + add = 5 + } + + if = { + limit = { + has_trait = lifestyle_reveler + } + add = 5 + if = { + limit = { + has_trait_xp = { + trait = lifestyle_reveler + value >= 100 + } + } + add = 15 + } + else_if = { + limit = { + has_trait_xp = { + trait = lifestyle_reveler + value >= 50 + } + } + add = 10 + } + } + + #SUBTRACT + if = { + limit = { has_trait = shy } + add = -5 + } + if = { + limit = { has_trait = zealous } + add = -5 + } + if = { + limit = { has_trait = craven } + add = -5 + } + if = { + limit = { has_trait = impatient } + add = -10 + } + if = { + limit = { has_trait = fickle} + add = -10 + } + if = { + limit = { has_trait = vengeful } + add = -10 + } + if = { + limit = { has_trait = wrathful } + add = -10 + } + if = { + limit = { has_trait = humble } + add = -10 + } + if = { + limit = { has_trait = content } + add = -15 + } + if = { + limit = { has_trait = generous } + add = -15 + } + if = { + limit = { has_trait = diligent } + add = -15 # Further 'moderation' impact below. + } + if = { + limit = { has_trait = temperate } + add = -20 # Further 'moderation' impact below. + } + if = { + limit = { has_trait = reclusive } + add = -20 + } + if = { + limit = { has_trait = paranoid } + add = -25 + } + if = { + limit = { has_trait = inappetetic } + add = -50 + } + + # MODERATION - reduces weight if overweight, and increases it if underweight + if = { + limit = { + has_trait = athletic + } + multiply = 0.8 + } + if = { + limit = { + has_trait = whole_of_body + } + multiply = 0.75 + } + if = { + limit = { is_very_young_character = yes } + multiply = 0.33 + } + if = { + limit = { is_young_character = yes } + multiply = 0.66 + } + if = { + limit = { is_aging_character = yes } + multiply = 1.5 + } + if = { + limit = { + has_trait = physique_good_1 + } + multiply = 0.9 + } + if = { + limit = { + has_trait = physique_good_2 + } + multiply = 0.8 + } + if = { + limit = { + has_trait = physique_good_3 + } + multiply = 0.7 + } + if = { + limit = { + has_trait = temperate + } + multiply = 0.9 + } + if = { + limit = { + has_trait = diligent + } + multiply = 0.9 + } + + #Bad physique has the opposite effect, making you skew even further towards extremes + if = { + limit = { + has_trait = physique_bad_1 + } + multiply = 1.1 + } + if = { + limit = { + has_trait = physique_bad_2 + } + multiply = 1.2 + } + if = { + limit = { + has_trait = physique_bad_3 + } + multiply = 1.3 + } +} + +base_weight_plus = { + add = base_weight + add = 10 +} + +base_weight_minus = { + add = base_weight + add = -10 +} + +#The actual value that will be looked at +character_weight_target_value = { + add = character_weight_base_value + + #To even the numbers out some if you have "good" and/or active traits + if = { + limit = { + OR = { + character_weight_base_value < base_weight_minus + character_weight_base_value > base_weight_plus + } + } + if = { + limit = { #You weigh too little + character_weight_base_value < base_weight_minus + } + if = { + limit = { has_trait = lifestyle_hunter } + add = 2 + if = { + limit = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 } + } + add = 2 + } + if = { + limit = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } + } + add = 2 + } + } + if = { + limit = { + has_lifestyle = martial_lifestyle + } + add = 10 + } + } + else = { #You weigh too much + if = { + limit = { has_trait = lifestyle_hunter } + if = { + limit = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 } + } + add = -2 + } + if = { + limit = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } + } + add = -2 + } + else = { + add = -2 + } + } + if = { + limit = { + has_lifestyle = martial_lifestyle + } + add = -10 + } + } + } +} + +# Pregnancy +pregnancy_month = { + value = pregnancy_days + divide = 30 + floor = yes + min = 1 +} + + + + + + + + + + +vigorous_sex_age_difference_value = { + value = age + subtract = 25 +} + +harm_event_random_list_low_odd_success_value = 40 +harm_event_random_list_low_odd_failure_value = 60 +harm_event_random_list_medium_odd_success_value = 60 +harm_event_random_list_medium_odd_failure_value = 40 +harm_event_random_list_high_odd_success_value = 70 +harm_event_random_list_high_odd_failure_value = 30 diff --git a/common/script_values/50_major_decision_values.txt b/common/script_values/50_major_decision_values.txt new file mode 100644 index 00000000..4413fd60 --- /dev/null +++ b/common/script_values/50_major_decision_values.txt @@ -0,0 +1,44 @@ + +#Central Asia Decision values +greatest_of_khans_target_counties = 100 + +invite_claimants_decision_prestige_value = { + if = { + limit = { highest_held_title_tier = tier_empire } + add = monumental_prestige_value + } + else_if = { + limit = { highest_held_title_tier = tier_kingdom } + add = massive_prestige_value + } + else_if = { + limit = { highest_held_title_tier = tier_duchy } + add = major_prestige_value + } + else_if = { + limit = { highest_held_title_tier = tier_county } + add = medium_prestige_value + } +} + +# Adopt Feudalism +convert_to_feudalism_development_requirement = { + value = 10 + if = { + limit = { + holder = { + any_neighboring_top_liege_realm_owner = { + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + } + } + } + } + subtract = 5 + } +} + +convert_whole_realm_to_feudalism_west_african_pagan_decision_vassal_count_value = 6 + +convert_whole_realm_to_feudalism_west_african_pagan_decision_wa_capital_development_value = terrible_development_level diff --git a/common/script_values/50_tribal_values.txt b/common/script_values/50_tribal_values.txt new file mode 100644 index 00000000..9a44966c --- /dev/null +++ b/common/script_values/50_tribal_values.txt @@ -0,0 +1,10 @@ +feudalize_tribal_holding_interaction_cost = { + value = 500 + if = { + limit = { + is_ai = yes + capital_province = { has_holding_type = tribal_holding } + } + add = -250 + } +} diff --git a/common/script_values/99_casus_belli_values.txt b/common/script_values/99_casus_belli_values.txt new file mode 100644 index 00000000..b452350d --- /dev/null +++ b/common/script_values/99_casus_belli_values.txt @@ -0,0 +1,1195 @@ + +# We separate out most of the guts of this cost multiplier to stop struggle CBs from double-dipping on costs and discounts. +common_cb_cost_multiplier_core = { + value = 1 + # Bellum Justum Perk + if = { + limit = { + scope:attacker = { + has_perk = bellum_justum_perk + } + } + multiply = { + add = bellum_justum_discount_percentage + divide = 100 + desc = CB_ATTACKER_BELLUM_JUSTUM + } + } + # Dynasty Warfare Perk + if = { + limit = { + scope:attacker = { + has_dynasty = yes + dynasty = { + has_dynasty_perk = warfare_legacy_2 + } + } + } + multiply = { + value = warfare_legacy_2_discount + desc = CB_ATTACKER_DYNASTY_WARFARE + } + } + # Culture + if = { + limit = { + scope:attacker = { + culture = { + has_cultural_parameter = cheaper_cbs + } + } + } + multiply = { + value = 0.8 + desc = "CB_ATTACKER_CULTURE" + } + } + + if = { + limit = { + scope:attacker = { government_has_flag = government_is_tribal } + } + multiply = { + value = 0.5 + desc = CB_TRIBAL_COST + } + } + + # Clan Unity modifiers + if = { + limit = { + scope:attacker = { + government_has_flag = government_is_clan + exists = scope:attacker.house + } + } + if = { + limit = { + scope:attacker.house = { + has_house_unity_parameter = unity_antagonistic_cb_cost + } + } + multiply = { + value = unity_antagonistic_cb_cost_value + desc = CB_UNITY_COST + } + } + if = { + limit = { + scope:attacker.house = { + has_house_unity_parameter = unity_competitive_cb_cost + } + } + multiply = { + value = unity_competitive_cb_cost_value + desc = CB_UNITY_COST + } + } + if = { + limit = { + scope:attacker.house = { + has_house_unity_parameter = unity_friendly_cb_cost + } + } + multiply = { + value = unity_friendly_cb_cost_value + desc = CB_UNITY_COST + } + } + if = { + limit = { + scope:attacker.house = { + has_house_unity_parameter = unity_harmonious_cb_cost + } + } + multiply = { + value = unity_harmonious_cb_cost_value + desc = CB_UNITY_COST + } + } + } + + # Special increase for Persia if Concession is reached + if = { + limit = { + exists = global_var:fp3_struggle_ending + global_var:fp3_struggle_ending = flag:fp3_struggle_concession_ending + OR = { + scope:attacker = { + capital_province ?= { + geographical_region = world_persian_empire + } + } + scope:defender = { + capital_province ?= { + geographical_region = world_persian_empire + } + } + } + } + multiply = { + value = 1 + add = { + if = { + limit = { + scope:attacker = { + house ?= { + OR = { + has_house_modifier = fp3_house_modifier_frontier_ambitions + has_house_modifier = fp3_house_modifier_rebuilding_efforts + } + } + } + } + add = 0.5 + } + if = { + limit = { + scope:defender = { + house ?= { + OR = { + has_house_modifier = fp3_house_modifier_frontier_ambitions + has_house_modifier = fp3_house_modifier_rebuilding_efforts + } + } + } + } + add = 0.5 + } + } + desc = CB_STRUGGLE_CONCESSION_ENDING + } + } + + if = { + limit = { + scope:attacker = { + house ?= { has_house_modifier = fp3_house_modifier_frontier_ambitions } + } + NOT = { + scope:defender = { + capital_province ?= { + geographical_region = world_persian_empire + } + } + } + } + multiply = 0.5 + } + + if = { + limit = { + has_game_rule = no_cost_casus_belli_costs + } + multiply = { + value = 0 + desc = CB_GAME_RULE_NO_COST + } + } + + if = { + limit = { + scope:attacker = { + ai_should_get_conqueror_bonuses = yes + } + } + multiply = { + value = 0 + desc = ai_conqueror_modifier + } + } +} + +common_cb_cost_multiplier = { + value = common_cb_cost_multiplier_core + # Struggle Multipliers + if = { + limit = { + scope:attacker = { + OR = { + any_character_struggle = { + involvement = involved + is_struggle_parameter_active_variable_cb_target_secondary_county_trigger = { PARAMETER = involved_or_interloper_wars_in_struggle_region_cheaper_costs } + } + any_character_struggle = { + involvement = interloper + is_struggle_parameter_active_variable_cb_target_secondary_county_trigger = { PARAMETER = involved_or_interloper_wars_in_struggle_region_cheaper_costs } + } + } + } + } + multiply = { + value = 0.5 + desc = CB_STRUGGLE_PHASE_DISCOUNT + } + } +} + + +##### Piety Costs + +# Multipliers + +# We separate out most of the guts of this cost multiplier to stop struggle CBs from double-dipping on costs and discounts. +common_cb_piety_cost_multiplier_core = { + value = 1 + # Faith Doctrine Piety Discounts + if = { + limit = { + scope:attacker.faith = { + has_doctrine_parameter = divine_destiny_holy_war_cost_reduction + } + } + multiply = { + value = 0.5 + desc = CB_DIVINE_DESTINY_COST + } + } + # Innovation Piety Discounts + if = { + limit = { + scope:attacker = { + culture = { + has_innovation = innovation_reconquista + } + } + } + multiply = { + value = 0.9 + desc = CB_RECONQUISTA_COST + } + } + # Vassal contract in-realm cost reduction + if = { + limit = { + scope:attacker = { + is_independent_ruler = no + vassal_contract_has_flag = vassal_contract_war_override + liege = scope:defender.liege + } + } + multiply = { + value = war_declaration_rights_allowed_cost_reduction + desc = "CB_ATTACKER_VASSAL_CONTRACT" + } + } + # Someone in the target region sacrificed your HoF. + if = { + limit = { + scope:defender = { + has_variable_list = humsacd_hofs + is_target_in_variable_list = { + name = humsacd_hofs + target = scope:attacker.faith + } + } + } + multiply = { + value = religious_cb_piety_discount_against_hof_humsac + desc = "CB_ATTACKER_HOF_HUMSACD" + } + } +} + +common_cb_piety_cost_multiplier_sans_struggles = { + value = common_cb_piety_cost_multiplier_core + # Common multiplier + multiply = common_cb_cost_multiplier_core +} + +common_cb_piety_cost_multiplier = { + value = common_cb_piety_cost_multiplier_core + # Struggle Multipliers + ## Generic modifiers. + if = { + limit = { + scope:attacker = { + OR = { + any_character_struggle = { + involvement = involved + is_struggle_parameter_active_variable_cb_target_secondary_county_trigger = { PARAMETER = involved_or_interloper_wars_in_struggle_region_cheaper_piety_costs } + } + any_character_struggle = { + involvement = interloper + is_struggle_parameter_active_variable_cb_target_secondary_county_trigger = { PARAMETER = involved_or_interloper_wars_in_struggle_region_cheaper_piety_costs } + } + } + } + } + multiply = { + value = 0.5 + desc = CB_STRUGGLE_PHASE_DISCOUNT + } + } + + # Common multiplier + multiply = common_cb_cost_multiplier_core +} + +holy_war_cb_piety_cost_multiplier = { + value = 1 + + if = { + limit = { + scope:attacker = { + faith = { has_doctrine_parameter = cheaper_holy_wars_active } + } + } + multiply = { + value = 0.8 + desc = CB_REDUCED_HOLY_WAR_COST + } + } + + # Ghazi reduction + if = { + limit = { + scope:attacker = { + is_independent_ruler = no + vassal_contract_has_flag = vassal_contract_cheaper_religious_war + } + } + multiply = { + value = ghazi_religious_war_cost_reduction + desc = "CB_ATTACKER_VASSAL_CONTRACT" + } + } +} + +# Base Costs +common_cb_impious_piety_cost = { + if = { # Attacking your HoF is impious + limit = { + exists = scope:attacker.faith.religious_head + scope:attacker.faith.religious_head = scope:defender + } + if = { + limit = { + scope:attacker.faith = { + has_doctrine = doctrine_spiritual_head + } + } + add = { + value = massive_piety_value + desc = CB_ATTACKER_HOF + } + } + else = { + add = { + value = medium_piety_value + desc = CB_ATTACKER_HOF + } + } + } + if = { + limit = { + scope:attacker.faith = scope:defender.faith + scope:defender = { + government_has_flag = government_is_theocracy + } + } + add = { + value = medium_piety_value + desc = CB_ATTACKER_THEOCRACY + } + } +} + +fp1_varangian_adventure_base_piety_cost = { + add = common_cb_impious_piety_cost + if = { + limit = { + scope:defender.faith = scope:attacker.faith + } + add = { + value = massive_piety_value + desc = CB_SAME_FAITH_COST + } + } +} + +##### Prestige Costs + +# Multipliers +# We separate out most of the guts of this cost multiplier to stop struggle CBs from double-dipping on costs and discounts. +common_cb_prestige_cost_multiplier_core = { + value = 1 + # Innovation Prestige Discounts + multiply = { + value = { + value = 1 + if = { + limit = { + scope:attacker = { + culture = { + has_innovation = innovation_chronicle_writing + } + } + } + add = -0.1 + } + if = { + limit = { + scope:attacker = { + culture = { + has_innovation = innovation_land_grants + } + } + } + add = -0.1 + } + if = { + limit = { + scope:attacker = { + culture = { + has_innovation = innovation_rightful_ownership + } + } + } + add = -0.1 + } + } + desc = CB_ATTACKER_INNOVATIONS + } + + # Vassal contract in-realm cost reduction + if = { + limit = { + scope:attacker = { + is_independent_ruler = no + vassal_contract_has_flag = vassal_contract_war_override + liege = scope:defender.liege + } + } + multiply = { + value = war_declaration_rights_allowed_cost_reduction + desc = "CB_ATTACKER_VASSAL_CONTRACT" + } + } + + # Ghazi extra cost + if = { + limit = { + scope:attacker = { + is_independent_ruler = no + vassal_contract_has_flag = vassal_contract_increase_prestige_cb_cost + } + } + multiply = { + value = 1 + add = ghazi_prestige_cost_increments + desc = "CB_ATTACKER_VASSAL_CONTRACT" + } + } +} + +common_cb_prestige_cost_multiplier_sans_struggles = { + value = common_cb_prestige_cost_multiplier_core + # Common modifier + multiply = common_cb_cost_multiplier_core +} + +common_cb_prestige_cost_multiplier = { + value = common_cb_prestige_cost_multiplier_core + # Struggle Multipliers + ## Discounts + if = { + limit = { + # Pre-filter struggle CB types, as we don't want to double-modify their costs. Makes for weird balancing. + # And then the main event. + scope:attacker = { + OR = { + any_character_struggle = { + involvement = involved + is_struggle_parameter_active_variable_cb_target_secondary_county_trigger = { PARAMETER = involved_or_interloper_wars_in_struggle_region_cheaper_prestige_costs } + } + any_character_struggle = { + involvement = interloper + is_struggle_parameter_active_variable_cb_target_secondary_county_trigger = { PARAMETER = involved_or_interloper_wars_in_struggle_region_cheaper_prestige_costs } + } + } + } + } + multiply = { + value = 0.5 + desc = CB_STRUGGLE_PHASE_DISCOUNT + } + } + ## Surcharges + if = { + limit = { + # Pre-filter struggle CB types, as we don't want to double-modify their costs. Makes for weird balancing. + # And then the main event. + scope:attacker = { + OR = { + any_character_struggle = { + involvement = involved + is_struggle_parameter_active_variable_cb_target_secondary_county_trigger = { PARAMETER = involved_or_interloper_diff_faith_wars_in_struggle_region_more_expensive_prestige_costs } + } + any_character_struggle = { + involvement = interloper + is_struggle_parameter_active_variable_cb_target_secondary_county_trigger = { PARAMETER = involved_or_interloper_diff_faith_wars_in_struggle_region_more_expensive_prestige_costs } + } + } + } + } + multiply = { + value = 1.5 + desc = CB_STRUGGLE_PHASE_SURCHARGE + } + } + + # Common modifier + multiply = common_cb_cost_multiplier +} + +# Base Costs +claim_cb_prestige_cost = { + if = { + # Prestige cost can vary significantly for personal claims, based on the situation(s) the claimant/defender are in. + limit = { scope:claimant = scope:attacker } + + add = { + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = { + value = 100 + if = { + # 25% cheaper to take Pressed claims. + limit = { scope:attacker = { has_strong_claim_on = prev } } + add = -25 + } + } + } + every_in_list = { + list = target_titles + limit = { tier = tier_duchy } + add = { + value = 200 + if = { + # 25% cheaper to take Pressed claims. + limit = { scope:attacker = { has_strong_claim_on = prev } } + add = -50 + } + } + } + every_in_list = { + list = target_titles + limit = { tier = tier_kingdom } + add = { + value = 400 + if = { + # 25% cheaper to take Pressed claims. + limit = { scope:attacker = { has_strong_claim_on = prev } } + add = -100 + } + } + } + every_in_list = { + list = target_titles + limit = { tier = tier_empire } + add = { + value = 800 + if = { + # 25% cheaper to take Pressed claims. + limit = { scope:attacker = { has_strong_claim_on = prev } } + add = -200 + } + } + } + + # Player adventurers pay much more. + if = { + limit = { + scope:attacker = { + is_landless_adventurer = yes + is_ai = no + } + } + multiply = 10 + } + + desc = "CB_CLAIM_COST_TARGET_TITLES" + } + if = { # 50% cheaper for adults to take titles from child rulers. + limit = { + scope:attacker = { is_adult = yes } + scope:defender = { is_adult = no } + } + multiply = { + value = 0.5 + desc = "CB_COST_DEFENDER_IS_CHILD" + } + } + else_if = { # 50% more expensive for children to take titles from adult rulers. + limit = { + scope:attacker = { is_adult = no } + scope:defender = { is_adult = yes } + } + multiply = { + value = 1.5 + desc = "CB_COST_ATTACKER_IS_CHILD" + } + } + if = { # 50% cheaper to take titles from a dynasty member. + limit = { + scope:attacker.dynasty = scope:defender.dynasty + } + multiply = { + value = 0.5 + desc = "CB_COST_SAME_DYNASTY" + } + } + + if = { + limit = { # If claimant & target share a faith, cost is modified by gender preferences. + scope:attacker.faith = scope:defender.faith + scope:attacker = { + sex_opposite_of = scope:defender + } + OR = { + scope:attacker.faith = { has_doctrine = doctrine_gender_male_dominated } + scope:attacker.faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + multiply = { + if = { + limit = { + scope:attacker.faith = { has_doctrine = doctrine_gender_male_dominated } + } + if = { + limit = { # 25% cheaper for men to press claims on female rulers in male-dominated societies. + scope:attacker = { is_male = yes } + scope:defender = { is_male = no } + } + value = 0.75 + } + else_if = { + limit = { # 25% more expensive for women to press claims on male rulers in male-dominated societies. + scope:attacker = { is_male = no } + scope:defender = { is_male = yes } + } + value = 1.25 + } + else = { + value = 1 + } + } + else_if = { + limit = { + scope:attacker.faith = { has_doctrine = doctrine_gender_female_dominated } + } + if = { + limit = { # 25% cheaper for women to press claims on male rulers in female-dominated societies. + scope:attacker = { is_male = no } + scope:defender = { is_male = yes } + } + value = 0.75 + } + else_if = { + limit = { # 25% more expensive for men to press claims on female rulers in female-dominated societies. + scope:attacker = { is_male = yes } + scope:defender = { is_male = no } + } + value = 1.25 + } + else = { + value = 1 + } + } + else = { + value = 1 + } + desc = "CB_CLAIM_COST_GENDER_PREFERENCES" + } + } + else_if = { + # Taking titles from someone of another faith costs 25% more, regardless of gender preferences. + limit = { + NOT = { + scope:attacker.faith = scope:defender.faith + } + } + multiply = { + value = 1.25 + desc = "CB_COST_DIFFERENT_FAITH" + } + } + + if = { # 25% more expensive to take titles from lower-tier rulers (pick on someone your own size!) + limit = { + scope:attacker.primary_title.tier > scope:defender.primary_title.tier + } + multiply = { + value = 1.25 + desc = "CB_DEFNDER_LOWER_TIER" + } + } + } + else = { + # When pressing a 3rd party's claims, the cost is mostly static. + add = { + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = 250 + } + every_in_list = { + list = target_titles + limit = { tier = tier_duchy } + add = 500 + } + every_in_list = { + list = target_titles + limit = { tier = tier_kingdom } + add = 1000 + } + every_in_list = { + list = target_titles + limit = { tier = tier_empire } + add = 3000 + } + desc = "CB_CLAIM_COST_TARGET_TITLES" + } + if = { + limit = { # 100% more expensive to press claims for someone not of your Religion + NOT = { scope:attacker.faith.religion = scope:claimant.faith.religion } + } + multiply = { + value = 2 + desc = "CB_CLAIM_COST_CLAIMANT_DIFFERENT_RELIGION" + } + } + if = { + limit = { # 50% more expensive to press claims for someone not in your Dynasty + NOT = { scope:attacker.dynasty = scope:claimant.dynasty } + } + multiply = { + value = 1.5 + desc = "CB_CLAIM_COST_CLAIMANT_DIFFERENT_DYNASTY" + } + } + else_if = { + limit = { # 25% more expensive to press claims for someone not in your House + NOT = { scope:attacker.house = scope:claimant.house } + } + multiply = { + value = 1.25 + desc = "CB_CLAIM_COST_CLAIMANT_DIFFERENT_HOUSE" + } + } + } +} + +tribal_subjugation_cb_prestige_cost = { + value = 0 + if = { + limit = { + NAND = { + scope:attacker.faith.religious_head = scope:attacker + scope:defender.faith = scope:attacker.faith + } + } + add = { + value = 1000 + desc = CB_BASE_COST + } + } + if = { + limit = { + exists = scope:attacker.primary_title + scope:attacker.primary_title = { + tier = tier_kingdom + } + } + multiply = { + value = 1.5 + desc = CB_COST_RULES_KINGDOM + } + } + else_if = { + limit = { + exists = scope:attacker.primary_title + scope:attacker.primary_title = { + tier = tier_empire + } + } + multiply = { + value = 2.5 + desc = CB_COST_RULES_EMPIRE + } + } + + multiply = common_cb_prestige_cost_multiplier +} + +# Ancestor war base cost +ancestor_cb_prestige_cost = { + add = { + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = { + value = 100 + } + } + every_in_list = { + list = target_titles + limit = { tier = tier_duchy } + add = { + value = 200 + } + } + every_in_list = { + list = target_titles + limit = { tier = tier_kingdom } + add = { + value = 400 + } + } + every_in_list = { + list = target_titles + limit = { tier = tier_empire } + add = { + value = 800 + } + } + desc = "CB_CLAIM_COST_TARGET_TITLES" + } + if = { # 50% cheaper for adults to take titles from child rulers. + limit = { + scope:attacker = { is_adult = yes } + scope:defender = { is_adult = no } + } + multiply = { + value = 0.5 + desc = "CB_COST_DEFENDER_IS_CHILD" + } + } + else_if = { # 50% more expensive for children to take titles from adult rulers. + limit = { + scope:attacker = { is_adult = no } + scope:defender = { is_adult = yes } + } + multiply = { + value = 1.5 + desc = "CB_COST_ATTACKER_IS_CHILD" + } + } + if = { # 50% cheaper to take titles from a dynasty member. + limit = { + scope:attacker.dynasty = scope:defender.dynasty + } + multiply = { + value = 0.5 + desc = "CB_COST_SAME_DYNASTY" + } + } + + if = { + limit = { # If claimant & target share a faith, cost is modified by gender preferences. + scope:attacker.faith = scope:defender.faith + scope:attacker = { + sex_opposite_of = scope:defender + } + OR = { + scope:attacker.faith = { has_doctrine = doctrine_gender_male_dominated } + scope:attacker.faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + multiply = { + if = { + limit = { + scope:attacker.faith = { has_doctrine = doctrine_gender_male_dominated } + } + if = { + limit = { # 25% cheaper for men to press claims on female rulers in male-dominated societies. + scope:attacker = { is_male = yes } + scope:defender = { is_male = no } + } + value = 0.75 + } + else_if = { + limit = { # 25% more expensive for women to press claims on male rulers in male-dominated societies. + scope:attacker = { is_male = no } + scope:defender = { is_male = yes } + } + value = 1.25 + } + else = { + value = 1 + } + } + else_if = { + limit = { + scope:attacker.faith = { has_doctrine = doctrine_gender_female_dominated } + } + if = { + limit = { # 25% cheaper for women to press claims on male rulers in female-dominated societies. + scope:attacker = { is_male = no } + scope:defender = { is_male = yes } + } + value = 0.75 + } + else_if = { + limit = { # 25% more expensive for men to press claims on female rulers in female-dominated societies. + scope:attacker = { is_male = yes } + scope:defender = { is_male = no } + } + value = 1.25 + } + else = { + value = 1 + } + } + else = { + value = 1 + } + desc = "CB_CLAIM_COST_GENDER_PREFERENCES" + } + } + else_if = { + # Taking titles from someone of another faith costs 25% more, regardless of gender preferences. + limit = { + NOT = { + scope:attacker.faith = scope:defender.faith + } + } + multiply = { + value = 1.25 + desc = "CB_COST_DIFFERENT_FAITH" + } + } + + if = { # 25% more expensive to take titles from lower-tier rulers (pick on someone your own size!) + limit = { + scope:attacker.primary_title.tier > scope:defender.primary_title.tier + } + multiply = { + value = 1.25 + desc = "CB_DEFNDER_LOWER_TIER" + } + } +} + +##### Multi-Currency Costs + +struggle_cb_phase_modifier_cost = { + # Phase modifiers. + ## Note that these aren't hooked up to the actual _parameters_ for tooltip reasons: we'd have to check what the phase is anyway, so we just check off of the phase to begin with and save ourselves a worthless parameter check. + add = { + value = 0 + # Cheap. + if = { + limit = { + scope:attacker = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + is_struggle_phase = struggle_iberia_phase_hostility + is_secondary_character_involvement_either_trigger = { CHAR = scope:defender } + } + } + } + add = { + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = { + value = minor_prestige_value + } + } + multiply = { + value = 0.9 + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = { + value = 0.1 + } + } + max = 2 + } + desc = CB_COST_STRUGGLE_PHASE_HOSTILITY + } + } + # Standard. + if = { + limit = { + scope:attacker = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + is_struggle_phase = struggle_iberia_phase_opportunity + is_secondary_character_involvement_either_trigger = { CHAR = scope:defender } + } + } + } + add = { + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = { + value = medium_prestige_value + } + } + multiply = { + value = 0.9 + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = { + value = 0.1 + } + } + max = 2 + } + desc = CB_COST_STRUGGLE_PHASE_OPPORTUNITY + } + } + # Expensive. + if = { + limit = { + scope:attacker = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + is_struggle_phase = struggle_iberia_phase_compromise + is_secondary_character_involvement_either_trigger = { CHAR = scope:defender } + } + } + } + add = { + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = { + value = major_prestige_value + } + } + multiply = { + value = 0.9 + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = { + value = 0.1 + } + } + max = 2 + } + desc = CB_COST_STRUGGLE_PHASE_COMPROMISE + } + } + if = { + limit = { + scope:attacker = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + is_struggle_phase = struggle_iberia_phase_conciliation + is_secondary_character_involvement_either_trigger = { CHAR = scope:defender } + } + } + } + add = { + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = { + value = major_prestige_value + } + } + multiply = { + value = 0.9 + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = { + value = 0.1 + } + } + max = 2 + } + desc = CB_COST_STRUGGLE_PHASE_CONCILIATION + } + } + if = { # Post Struggle cost + limit = { + scope:attacker = { + exists = scope:attacker.house + scope:attacker.house = { + OR ={ + has_house_modifier = fp2_struggle_hostility_house_combined_modifier + has_house_modifier = fp2_struggle_hostility_house_faith_modifier + has_house_modifier = fp2_struggle_hostility_house_culture_modifier + } + } + } + } + add = { + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = { + value = major_prestige_value + } + } + multiply = { + value = 0.9 + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = { + value = 0.1 + } + } + max = 2 + } + desc = CB_BASE_COST + } + } + } +} + +common_claim_reduction_cost_multiplier_core = { + value = 1 + # Claim discounts + scope:attacker = { + if = { + limit = { + any_claim = { + is_in_list = target_titles + } + } + multiply = { + value = 1 + every_claim = { + limit = { is_in_list = target_titles } + multiply = 0.75 + } + min = 0.2 + desc = CLAIMED_TITLES_DESC + } + } + if = { + limit = { + any_claim = { + de_jure_liege = { is_in_list = target_titles } + } + } + multiply = { + value = 1 + every_claim = { + limit = { + de_jure_liege = { is_in_list = target_titles } + } + multiply = 0.9 + } + min = 0.2 + desc = CLAIMED_DE_JURE_TITLES_DESC + } + } + } +} diff --git a/common/script_values/99_chancellor_values.txt b/common/script_values/99_chancellor_values.txt new file mode 100644 index 00000000..3a614597 --- /dev/null +++ b/common/script_values/99_chancellor_values.txt @@ -0,0 +1,838 @@ +################## +# Foreign Affairs +################## + +# Foreign Affairs opinion base modifier +chancellor_foreign_affairs_opinion_base = { + add = diplomacy + divide = 2 +} + +# Bonus to opinion from Adaptive Traditions +chancellor_foreign_affairs_opinion_max_perk_bonus_modifier = { + add = chancellor_foreign_affairs_opinion_base + multiply = { + add = adaptive_traditions_perk_impact_percent + divide = 100 + } +} + +# Bonus to opinion from Bureaucrats +chancellor_foreign_affairs_opinion_max_erudition_modifier = { + add = chancellor_foreign_affairs_opinion_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +# Bonus to opinion from Family Business +chancellor_foreign_affairs_opinion_max_family_business_modifier = { + add = chancellor_foreign_affairs_opinion_base + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +# Bonus to opinion from FP3 Consulted House Member +chancellor_foreign_affairs_opinion_max_consulted_house_modifier = { + add = chancellor_foreign_affairs_opinion_base + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +# Bonus to opinion from Astounding Presence +chancellor_foreign_affairs_opinion_max_court_fashion_modifier = { + add = chancellor_foreign_affairs_opinion_base + multiply = { + add = 10 + divide = 100 + } +} + +# Calculated max opinion +chancellor_foreign_affairs_opinion_max = { + add = chancellor_foreign_affairs_opinion_base + # Add bonus from Clerical Justification: + if = { + limit = { + scope:councillor_liege = { has_perk = adaptive_traditions_perk } + } + add = chancellor_foreign_affairs_opinion_max_perk_bonus_modifier + } + # Add bonus from Bureaucrats + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = chancellor_foreign_affairs_opinion_max_erudition_modifier + } + # Add bonus from Family Business + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = chancellor_foreign_affairs_opinion_max_family_business_modifier + } + # Add bonus from FP3 Consulted House + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = chancellor_foreign_affairs_opinion_max_consulted_house_modifier + } + # Add bonus from Astounding Presence + if = { + limit = { + scope:councillor_liege = { has_character_modifier = court_fashion_foreign_modifier } + } + add = chancellor_foreign_affairs_opinion_max_court_fashion_modifier + } +} + +# Set to max for AI, or gradual scale for players +chancellor_foreign_affairs_realm_opinion_scale = { + add = 0 + if = { + limit = { + scope:councillor_liege = { + is_independent_ruler = no + is_ai = yes + } + } + add = chancellor_foreign_affairs_opinion_max + } + else_if = { + limit = { + scope:councillor_liege = { + is_independent_ruler = no + has_variable = chancellor_foreign_affairs_opinion_value + } + } + add = liege.var:chancellor_foreign_affairs_opinion_value + } +} + +chancellor_foreign_affairs_independent_opinion_scale = { + add = 0 + if = { + limit = { + scope:councillor_liege = { + is_ai = yes + is_independent_ruler = yes + } + } + add = chancellor_foreign_affairs_opinion_max + } + else_if = { + limit = { + scope:councillor_liege = { + is_independent_ruler = yes + has_variable = chancellor_foreign_affairs_opinion_value + } + } + add = liege.var:chancellor_foreign_affairs_opinion_value + } +} + +# Calculate monthly increase +chancellor_foreign_affairs_monthly_increase = { + add = chancellor_foreign_affairs_opinion_max + divide = 24 +} + +### Prestige gain + +# Base prestige gain scale +chancellor_foreign_affairs_prestige_gain_base = { + add = diplomacy + divide = 20 +} + +# Adaptive Traditions bonus +chancellor_foreign_affairs_prestige_gain_perk_bonus_modifier = { + if = { + limit = { scope:councillor_liege = { has_perk = adaptive_traditions_perk } } + add = chancellor_foreign_affairs_prestige_gain_base + multiply = { + value = adaptive_traditions_perk_impact_percent + divide = 100 + } + } +} + +# Bureaucrats bonus +chancellor_foreign_affairs_prestige_gain_erudition_modifier = { + if = { + limit = { councillor_liege_has_erudition_legacy_5_perk = yes } + add = chancellor_foreign_affairs_prestige_gain_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } + } +} + +# Family Business bonus +chancellor_foreign_affairs_prestige_gain_family_business_modifier = { + if = { + limit = { councillor_liege_has_family_business_bonus = yes } + add = chancellor_foreign_affairs_prestige_gain_base + multiply = { + add = family_business_councillors_percentage + divide = 100 + } + } +} + +# FP3 Consulted House bonus +chancellor_foreign_affairs_prestige_gain_consulted_house_modifier = { + if = { + limit = { councillor_liege_has_consulted_house_bonus = yes } + add = chancellor_foreign_affairs_prestige_gain_base + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } + } +} + +# Total prestige gained per month through foreign affairs, including all modifiers +chancellor_foreign_affairs_prestige_total = { + add = chancellor_foreign_affairs_prestige_gain_base + add = chancellor_foreign_affairs_prestige_gain_perk_bonus_modifier + add = chancellor_foreign_affairs_prestige_gain_erudition_modifier + add = chancellor_foreign_affairs_prestige_gain_family_business_modifier + add = chancellor_foreign_affairs_prestige_gain_consulted_house_modifier +} + +#################### +# Domestic Affairs +#################### +chancellor_domestic_affairs_opinion_base = { + add = diplomacy + divide = 2 +} + +chancellor_domestic_affairs_opinion_chains_of_loyalty_bonus = { + add = chancellor_domestic_affairs_opinion_base + multiply = { + add = chains_of_loyalty_percentage + divide = 100 + } +} + +chancellor_domestic_affairs_opinion_erudition_bonus = { + add = chancellor_domestic_affairs_opinion_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +chancellor_domestic_affairs_opinion_family_business_bonus = { + add = chancellor_domestic_affairs_opinion_base + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +chancellor_domestic_affairs_opinion_consulted_house_bonus = { + add = chancellor_domestic_affairs_opinion_base + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +chancellor_domestic_affairs_opinion_pandidakterion_bonus = { + add = chancellor_domestic_affairs_opinion_base + multiply = { + add = 20 + divide = 100 + } +} + +chancellor_domestic_affairs_opinion_food_bonus = { + add = chancellor_domestic_affairs_opinion_base + multiply = { + add = 15 + divide = 100 + } +} + +chancellor_domestic_affairs_opinion_cupbearer_bonus = { + add = chancellor_domestic_affairs_opinion_base + multiply = { + add = 20 + divide = 100 + } +} + +chancellor_domestic_affairs_opinion_max = { + add = chancellor_domestic_affairs_opinion_base + if = { + limit = { + scope:councillor_liege = { has_perk = chains_of_loyalty_perk } + } + add = chancellor_domestic_affairs_opinion_chains_of_loyalty_bonus + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = chancellor_domestic_affairs_opinion_erudition_bonus + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = chancellor_domestic_affairs_opinion_family_business_bonus + } + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = chancellor_domestic_affairs_opinion_consulted_house_bonus + } + if = { + limit = { + scope:councillor_liege = { + has_title = title:c_byzantion + title:c_byzantion = { has_county_modifier = pandidakterion_university_modifier } + } + } + add = chancellor_domestic_affairs_opinion_pandidakterion_bonus + } + if = { + limit = { + scope:councillor_liege = { + has_character_flag = food_improves_opinion + } + } + add = chancellor_domestic_affairs_opinion_food_bonus + } +} + +chancellor_domestic_affairs_opinion_scale = { + value = 0 + if = { + limit = { + scope:councillor_liege = { + is_ai = yes + is_independent_ruler = yes + } + } + add = chancellor_domestic_affairs_opinion_max + } + else_if = { + limit = { + scope:councillor_liege = { has_variable = chancellor_domestic_affairs_opinion_value } + } + add = scope:councillor_liege.var:chancellor_domestic_affairs_opinion_value + } +} + +chancellor_domestic_affairs_monthly_increase = { + add = chancellor_domestic_affairs_opinion_max + divide = 24 +} + +chancellor_domestic_affairs_tyranny_base = { + add = diplomacy + #multiply = 2 + min = 1 +} + +chancellor_domestic_affairs_tyranny_chains_of_loyalty_bonus = { + value = 0 + if = { + limit = { + scope:councillor_liege = { has_perk = chains_of_loyalty_perk } + } + add = { + value = chancellor_domestic_affairs_tyranny_base + multiply = { + add = chains_of_loyalty_percentage + divide = 100 + } + } + } +} + +chancellor_domestic_affairs_tyranny_erudition_bonus = { + value = 0 + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = { + value = chancellor_domestic_affairs_tyranny_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } + } + } +} + +chancellor_domestic_affairs_tyranny_family_business_bonus = { + value = 0 + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = { + value = chancellor_domestic_affairs_tyranny_base + multiply = { + add = family_business_councillors_percentage + divide = 100 + } + } + } +} + +chancellor_domestic_affairs_tyranny_consulted_house_bonus = { + value = 0 + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = { + value = chancellor_domestic_affairs_tyranny_base + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } + } + } +} + +chancellor_domestic_affairs_tyranny_food_bonus = { + value = 0 + if = { + limit = { + scope:councillor_liege = { + has_character_flag = food_improves_opinion + } + } + add = { + value = chancellor_domestic_affairs_tyranny_base + multiply = { + add = 10 + divide = 100 + } + } + } +} + +chancellor_domestic_affairs_tyranny_total = { + add = chancellor_domestic_affairs_tyranny_base + add = chancellor_domestic_affairs_tyranny_chains_of_loyalty_bonus + add = chancellor_domestic_affairs_tyranny_erudition_bonus + add = chancellor_domestic_affairs_tyranny_family_business_bonus + add = chancellor_domestic_affairs_tyranny_consulted_house_bonus + add = chancellor_domestic_affairs_tyranny_food_bonus +} + +##################### +# Integrate Title +##################### + +chancellor_integrate_title_current_progress = { + value = 0 + if = { + limit = { exists = scope:county } + add = scope:county.active_de_jure_drift_progress + } +} + +chancellor_integrate_title_progress_gain = { + add = diplomacy + multiply = 0.035 +} + +chancellor_integrate_title_erudition_bonus = { + add = chancellor_integrate_title_progress_gain + multiply = family_business_councillors_percentage + divide = 100 +} + +chancellor_integrate_title_family_business_bonus = { + add = chancellor_integrate_title_progress_gain + multiply = family_business_councillors_percentage + divide = 100 +} + +chancellor_integrate_title_consulted_house_bonus = { + add = chancellor_integrate_title_progress_gain + multiply = consulted_house_councillors_percentage + divide = 100 +} + + +# Relation impact +chancellor_integrate_title_monthly_increase_friend_bonus = { + value = chancellor_integrate_title_progress_gain + multiply = { + add = council_friend_impact_percentage + divide = 100 + } +} +chancellor_integrate_title_monthly_increase_best_friend_bonus = { + value = chancellor_integrate_title_progress_gain + multiply = { + add = council_best_friend_impact_percentage + divide = 100 + } +} +chancellor_integrate_title_monthly_increase_rival_bonus = { + value = chancellor_integrate_title_progress_gain + multiply = { + add = council_rival_impact_percentage + divide = 100 + } +} +chancellor_integrate_title_monthly_increase_nemesis_bonus = { + value = chancellor_integrate_title_progress_gain + multiply = { + add = council_nemesis_impact_percentage + divide = 100 + } +} + +chancellor_integrate_title_contextual_bonuses = { + # Relation Bonuses/Penalties + if = { # Friend + limit = { + scope:councillor_liege = { + has_relation_friend = scope:councillor + NOT = { has_relation_best_friend = scope:councillor } + } + } + add = { + value = scope:councillor.chancellor_integrate_title_monthly_increase_friend_bonus + desc = COUNCILLOR_IS_YOUR_FRIEND + } + } + if = { # Best Friend + limit = { + scope:councillor_liege = { + has_relation_best_friend = scope:councillor + } + } + add = { + value = scope:councillor.chancellor_integrate_title_monthly_increase_best_friend_bonus + desc = COUNCILLOR_IS_YOUR_BEST_FRIEND + } + } + if = { # Rival + limit = { + scope:councillor_liege = { + has_relation_rival = scope:councillor + NOT = { has_relation_nemesis = scope:councillor } + } + } + add = { + value = scope:councillor.chancellor_integrate_title_monthly_increase_rival_bonus + desc = COUNCILLOR_IS_YOUR_RIVAL + } + } + if = { # Nemesis + limit = { + scope:councillor_liege = { + has_relation_nemesis = scope:councillor + } + } + add = { + value = scope:councillor.chancellor_integrate_title_monthly_increase_nemesis_bonus + desc = COUNCILLOR_IS_YOUR_NEMESIS + } + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = { + value = scope:councillor.chancellor_integrate_title_erudition_bonus + desc = INTEGRATE_TITLE_DYNASTY_PERK_BONUS_VALUE + } + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = { + value = scope:councillor.chancellor_integrate_title_family_business_bonus + desc = FAMILY_BUSINESS_BONUS_VALUE + } + } + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = { + value = scope:councillor.chancellor_integrate_title_consulted_house_bonus + desc = CONSULTED_HOUSE_BONUS_VALUE + } + } + # EP3 Promote Integration + if = { + limit = { + scope:county = { has_county_modifier = improve_de_jure_integration_modifier } + scope:councillor_liege = scope:county.holder.top_liege + } + add = { + value = chancellor_integrate_title_consulted_house_bonus + desc = improve_de_jure_integration_modifier + } + } + # EP3 Admin Emperor Bonus + if = { + limit = { # Task instigator is admin top liege + scope:councillor_liege = { + is_independent_ruler = yes + government_allows = administrative + } + } + add = { + value = chancellor_integrate_title_admin_top_liege_bonus + desc = chancellor_integrate_title_admin_top_liege_bonus_desc + } + } + # EP3 Admin Realm County Bonus + if = { + limit = { # Task target is de jure part of an admin empire/kingdom + NOT = { + scope:councillor_liege = { government_allows = administrative } + } + trigger_if = { + limit = { exists = scope:county.empire.holder } + scope:county.empire.holder = { government_allows = administrative } + } + trigger_else = { + scope:county.kingdom.holder ?= { + is_independent_ruler = yes + government_allows = administrative + } + } + } + add = { + value = chancellor_integrate_title_admin_target_bonus + desc = chancellor_integrate_title_admin_target_bonus_desc + } + } +} + +##################### +# Bestow Royal Favor +##################### + +chancellor_bestow_royal_favor_base = 5 + +chancellor_bestow_royal_favor_monthly_change = { + value = { + add = scope:councillor.diplomacy + } +} + +chancellor_bestow_royal_favor_progress_gain = { + add = diplomacy + multiply = 0.5 +} + +chancellor_bestow_royal_favor_opinion_increase_per_success_base = { + add = { + value = scope:councillor.diplomacy + multiply = 0.3 + min = 1 + max = 10 + ceiling = yes + } +} + +chancellor_bestow_royal_favor_opinion_increase_per_success_grandeur = { + add = { + value = scope:councillor_liege.court_grandeur_current + multiply = 0.05 + min = 1 + max = 10 + ceiling = yes + } +} + +chancellor_bestow_royal_favor_opinion_gain_erudition_bonus = { + if = { + limit = { councillor_liege_has_erudition_legacy_5_perk = yes } + add = chancellor_bestow_royal_favor_opinion_increase_per_success_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } + round = yes + } +} + +chancellor_bestow_royal_favor_opinion_gain_family_business_bonus = { + if = { + limit = { councillor_liege_has_family_business_bonus = yes } + add = chancellor_bestow_royal_favor_opinion_increase_per_success_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } + round = yes + } +} + +chancellor_bestow_royal_favor_opinion_gain_consulted_house_bonus = { + if = { + limit = { councillor_liege_has_consulted_house_bonus = yes } + add = chancellor_bestow_royal_favor_opinion_increase_per_success_base + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } + round = yes + } +} + +chancellor_bestow_royal_favor_opinion_increase_per_success = { + add = chancellor_bestow_royal_favor_opinion_increase_per_success_base + add = chancellor_bestow_royal_favor_opinion_increase_per_success_grandeur + add = chancellor_bestow_royal_favor_opinion_gain_erudition_bonus + add = chancellor_bestow_royal_favor_opinion_gain_family_business_bonus + add = chancellor_bestow_royal_favor_opinion_gain_consulted_house_bonus +} + +# Base prestige gain scale +chancellor_bestow_royal_favor_prestige_gain_base = { + add = scope:councillor.diplomacy + divide = 5 + ceiling = yes + divide = 10 +} + +# Vassal's base prestige gain scale (static so we can add a character modifier) +chancellor_bestow_royal_favor_prestige_gain_base_vassal = { + add = 0.5 +} + +chancellor_bestow_favor_prestige_gain_erudition_modifier = { + if = { + limit = { councillor_liege_has_erudition_legacy_5_perk = yes } + add = chancellor_bestow_royal_favor_prestige_gain_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } + } +} + +chancellor_bestow_favor_prestige_gain_family_business_modifier = { + if = { + limit = { councillor_liege_has_family_business_bonus = yes } + add = chancellor_bestow_royal_favor_prestige_gain_base + multiply = { + add = family_business_councillors_percentage + divide = 100 + } + } +} + +chancellor_bestow_favor_prestige_gain_consulted_house_modifier = { + if = { + limit = { councillor_liege_has_consulted_house_bonus = yes } + add = chancellor_bestow_royal_favor_prestige_gain_base + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } + } +} + +chancellor_bestow_royal_favor_prestige_total = { + add = chancellor_bestow_royal_favor_prestige_gain_base + add = chancellor_bestow_favor_prestige_gain_erudition_modifier + add = chancellor_bestow_favor_prestige_gain_family_business_modifier + add = chancellor_bestow_favor_prestige_gain_consulted_house_modifier +} + +# Relation impact +chancellor_bestow_royal_favor_base_total = { + add = chancellor_bestow_royal_favor_base + add = chancellor_bestow_royal_favor_monthly_change +} + +chancellor_bestow_royal_favor_monthly_increase_friend_bonus = { + value = chancellor_bestow_royal_favor_base_total + multiply = { + add = council_friend_impact_percentage + divide = 100 + } +} +chancellor_bestow_royal_favor_monthly_increase_best_friend_bonus = { + value = chancellor_bestow_royal_favor_base_total + multiply = { + add = council_best_friend_impact_percentage + divide = 100 + } +} +chancellor_bestow_royal_favor_monthly_increase_rival_bonus = { + value = chancellor_bestow_royal_favor_base_total + multiply = { + add = council_rival_impact_percentage + divide = 100 + } +} +chancellor_bestow_royal_favor_monthly_increase_nemesis_bonus = { + value = chancellor_bestow_royal_favor_base_total + multiply = { + add = council_nemesis_impact_percentage + divide = 100 + } +} + + + + +### Learn on the Job modifier +chancellor_learn_on_the_job_scale = { + value = 0 + if = { + limit = { + exists = liege + liege = { has_perk = learn_on_the_job_perk } + } + add = diplomacy + multiply = { + add = learn_on_the_job_percentage + divide = 100 + } + floor = yes + min = 1 + } +} + +### Reliable House modifier +chancellor_reliable_house_scale = { + value = 0 + if = { + limit = { + exists = liege.dynasty + liege.dynasty = { has_dynasty_perk = fp2_coterie_legacy_2 } + house = liege.house + } + add = diplomacy + multiply = { + add = council_reliable_house_percentage + divide = 100 + } + floor = yes + min = 1 + } +} diff --git a/common/script_values/99_court_chaplain_values.txt b/common/script_values/99_court_chaplain_values.txt new file mode 100644 index 00000000..80f1ea4c --- /dev/null +++ b/common/script_values/99_court_chaplain_values.txt @@ -0,0 +1,1762 @@ + +########## +# Religious Relations +########## + +# Piety: + +# The base modifier +court_chaplain_religious_relations_modifier = { + add = learning + divide = 20 +} + +# Bonus from Clerical Justifications Perk +court_chaplain_religious_relations_perk_bonus_modifier = { + if = { + limit = { + scope:councillor_liege = { has_perk = clerical_justifications_perk } + } + # Set up the base value + add = court_chaplain_religious_relations_modifier + # Calculate the final value + multiply = { + add = clerical_justifications_percentage + divide = 100 + } + } +} + +# Bonus from Bureaucrats +court_chaplain_religious_relations_erudition_legacy_5_bonus_modifier = { + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + # Base value + add = court_chaplain_religious_relations_modifier + # Calculation of final value + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } + } +} + +court_chaplain_religious_relations_family_business_bonus_modifier = { + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + # Base value + add = court_chaplain_religious_relations_modifier + # Calculation of final value + multiply = { + add = family_business_councillors_percentage + divide = 100 + } + } +} + +court_chaplain_religious_relations_consulted_house_bonus_modifier = { + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + # Base value + add = court_chaplain_religious_relations_modifier + # Calculation of final value + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } + } +} + +# Total gain calculation +court_chaplain_religious_relations_total_piety_gain = { + add = court_chaplain_religious_relations_modifier + add = court_chaplain_religious_relations_perk_bonus_modifier + add = court_chaplain_religious_relations_erudition_legacy_5_bonus_modifier + add = court_chaplain_religious_relations_family_business_bonus_modifier + add = court_chaplain_religious_relations_consulted_house_bonus_modifier +} + +# Opinion: +# Religious Relations balancing value for no HoF -- this value will be used to divide the final values +court_chaplain_religious_relations_no_hof_balance = { + add = 2 +} + +# Base modifier value +court_chaplain_religious_relations_opinion_base = { + add = learning + divide = 2 +} + +court_chaplain_religious_relations_no_hof_opinion_base = { + add = court_chaplain_religious_relations_opinion_base + divide = court_chaplain_religious_relations_no_hof_balance +} + +# Bonus to opinion from Clerical Justifications Perk +court_chaplain_religious_relations_opinion_max_perk_modifier = { + add = court_chaplain_religious_relations_opinion_base + multiply = { + add = clerical_justifications_percentage + divide = 100 + } +} + +# Bonus to opinion from Bureaucrats +court_chaplain_religious_relations_opinion_max_erudition_modifier = { + add = court_chaplain_religious_relations_opinion_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +court_chaplain_religious_relations_opinion_max_family_business_modifier = { + add = court_chaplain_religious_relations_opinion_base + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +court_chaplain_religious_relations_opinion_max_consulted_house_modifier = { + add = court_chaplain_religious_relations_opinion_base + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +# Calculate the full max value of the opinion gain +court_chaplain_religious_relations_opinion_max = { + add = court_chaplain_religious_relations_opinion_base + # Add bonus from Clerical Justification: + if = { + limit = { + scope:councillor_liege = { has_perk = clerical_justifications_perk } + } + add = court_chaplain_religious_relations_opinion_max_perk_modifier + } + # Add bonus from Bureaucrats + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = court_chaplain_religious_relations_opinion_max_erudition_modifier + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = court_chaplain_religious_relations_opinion_max_family_business_modifier + } + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = court_chaplain_religious_relations_opinion_max_consulted_house_modifier + } +} + +court_chaplain_religious_relations_no_hof_opinion_max = { + add = court_chaplain_religious_relations_opinion_max + divide = court_chaplain_religious_relations_no_hof_balance +} + +# What % of total religious relations opinion gain have we achieved? +court_chaplain_religious_relations_opinion_scale = { + value = 0 + if = { + limit = { + scope:councillor_liege = { + is_ai = yes + is_independent_ruler = yes + } + } + add = court_chaplain_religious_relations_opinion_max + } + else_if = { + limit = { + scope:councillor_liege = { has_variable = court_chaplain_religious_relations_opinion_value } + } + add = scope:councillor_liege.var:court_chaplain_religious_relations_opinion_value + } +} + +# Value used to fetch the correct "current Opinion bonus" value for player or AI +# Bypasses monthly calculation for AI (it's not worth calculating it for them) +court_chaplain_religious_relations_opinion_modifier = { + add = 0 + if = { + limit = { + scope:councillor_liege = { + is_ai = no + has_variable = court_chaplain_religious_relations_opinion_value + } + } + add = liege.var:court_chaplain_religious_relations_opinion_value + } + else = { + add = court_chaplain_religious_relations_opinion_max + } +} + +court_chaplain_religious_relations_no_hof_opinion_modifier = { + add = 0 + if = { + limit = { + scope:councillor.faith = { + OR = { + has_doctrine_parameter = no_head_of_faith + NOT = { exists = religious_head } + } + has_doctrine = doctrine_theocracy_lay_clergy + } + } + add = court_chaplain_religious_relations_opinion_modifier + divide = court_chaplain_religious_relations_no_hof_balance + } +} + +# How much religious relations increases by montly. Simply derived from the Max value (which in turn considers Councillor Skill and bonuses) +court_chaplain_religious_relations_monthly_increase = { + add = court_chaplain_religious_relations_opinion_max + divide = 24 # 2 years to max out +} + +court_chaplain_religious_relations_no_hof_monthly_increase = { + add = court_chaplain_religious_relations_monthly_increase + divide = court_chaplain_religious_relations_no_hof_balance +} + + +##################### +# Fabricate Claim +##################### + +# Base value +court_chaplain_fabricate_claim_base = { + add = 3 +} + +court_chaplain_fabricate_claim_monthly_increase_base = { + add = learning + divide = 5 +} + +court_chaplain_fabricate_claim_base_total = { + add = court_chaplain_fabricate_claim_base + add = court_chaplain_fabricate_claim_monthly_increase_base +} + +# Bonus from Accomplished Forger Perk +court_chaplain_fabricate_claim_perk_bonus_monthly_increase = { + add = court_chaplain_fabricate_claim_base_total + multiply = { + add = accomplished_forger_percentage + divide = 100 + } +} + +# Bonus from Bureaucrats +court_chaplain_fabricate_claim_dynasty_perk_bonus = { + add = court_chaplain_fabricate_claim_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +# From Family Business +court_chaplain_fabricate_claim_family_business_bonus = { + add = court_chaplain_fabricate_claim_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +# FP3 Consulted House +court_chaplain_fabricate_claim_consulted_house_bonus = { + add = court_chaplain_fabricate_claim_base_total + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +# Bonus from Land Grants innovation +court_chaplain_fabricate_claim_innovation_bonus_land_grants = { + value = 0 + add = court_chaplain_fabricate_claim_base_total + multiply = 0.50 +} + +# Bonus from tradition_language_scholars +court_chaplain_fabricate_claim_tradition_language_scholars_bonus = { + value = 0 + add = court_chaplain_fabricate_claim_base_total + multiply = { + add = { + value = scope:councillor.liege.num_of_known_languages + multiply = 10 + } + divide = 100 + } +} + +court_chaplain_fabricate_claim_inspection_reward_bonus = { + value = 0 + add = court_chaplain_fabricate_claim_base_total + multiply = 0.25 +} + +# Relation impact +court_chaplain_fabricate_claim_monthly_increase_friend_bonus = { + value = court_chaplain_fabricate_claim_base_total + multiply = { + add = council_friend_impact_percentage + divide = 100 + } +} +court_chaplain_fabricate_claim_monthly_increase_best_friend_bonus = { + value = court_chaplain_fabricate_claim_base_total + multiply = { + add = council_best_friend_impact_percentage + divide = 100 + } +} +court_chaplain_fabricate_claim_monthly_increase_rival_bonus = { + value = court_chaplain_fabricate_claim_base_total + multiply = { + add = council_rival_impact_percentage + divide = 100 + } +} +court_chaplain_fabricate_claim_monthly_increase_nemesis_bonus = { + value = court_chaplain_fabricate_claim_base_total + multiply = { + add = council_nemesis_impact_percentage + divide = 100 + } +} + +court_chaplain_fabricate_claim_county_base = 3 +court_chaplain_fabricate_claim_county_min_cost = { + value = { 40 60 } +} + +court_chaplain_fabricate_claim_duchy_base = 7 +court_chaplain_fabricate_claim_duchy_min_cost = { + value = { 80 100 } +} + +court_chaplain_fabricate_claim_factor = 1 + +court_chaplain_fabricate_claim_struggle_penalty_multiplier_value = { + if = { + limit = { + exists = scope:county + scope:county = { + any_county_struggle = { + is_struggle_parameter_active_secondary_character_involvement_neither_trigger = { + PARAMETER = claims_in_region_more_expensive_to_press_for_uninvolved + CHAR = root + } + } + } + } + value = 2 + } + else = { value = 1 } +} + +court_chaplain_fabricate_claim_county_cost = { + # Base cost + add = 40 + subtract = learning + # Standard Factors + multiply = court_chaplain_fabricate_claim_factor + multiply = court_chaplain_fabricate_claim_county_base + # Struggle Factors + multiply = court_chaplain_fabricate_claim_struggle_penalty_multiplier_value + + min = court_chaplain_fabricate_claim_county_min_cost +} + +court_chaplain_fabricate_claim_duchy_cost = { + # Base cost + add = 40 + subtract = learning + # Standard Factors + multiply = court_chaplain_fabricate_claim_factor + multiply = court_chaplain_fabricate_claim_duchy_base + # Struggle Factors + multiply = court_chaplain_fabricate_claim_struggle_penalty_multiplier_value + + min = court_chaplain_fabricate_claim_duchy_min_cost +} + +court_chaplain_fabricate_claim_not_adjacent_penalty = { + value = 0.5 +} + +court_chaplain_fabricate_claim_vassal_penalty = { + value = 0.3 +} + +court_chaplain_heretic_bonus = { + value = 1.3 +} + +####################### +# Conversion +####################### + +# Base progress value +court_chaplain_conversion_base = { + add = 0.5 +} + +court_chaplain_conversion_monthly_increase = { + add = learning + divide = 10 +} + +court_chaplain_conversion_base_total = { + add = court_chaplain_conversion_base + add = court_chaplain_conversion_monthly_increase +} + +court_chaplain_conversion_contextual_bonuses = { + #Perk Bonus + if = { + limit = { + scope:councillor_liege = { has_perk = zealous_proselytizer_perk } + } + add = { + value = scope:councillor.court_chaplain_conversion_monthly_increase_perk_bonus + desc = CONVERSION_PERK_BONUS_VALUE + } + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = { + value = scope:councillor.court_chaplain_conversion_monthly_increase_dynasty_perk_bonus + desc = CONVERSION_DYNASTY_PERK_BONUS_VALUE + } + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = { + value = scope:councillor.court_chaplain_conversion_monthly_increase_family_business_bonus + desc = FAMILY_BUSINESS_BONUS_VALUE + } + } + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = { + value = scope:councillor.court_chaplain_conversion_monthly_increase_consulted_house_bonus + desc = CONSULTED_HOUSE_BONUS_VALUE + } + } + # Relation Bonuses/Penalties + if = { # Friend + limit = { + scope:councillor_liege = { + has_relation_friend = scope:councillor + NOT = { has_relation_best_friend = scope:councillor } + } + } + add = { + value = scope:councillor.court_chaplain_conversion_monthly_increase_friend_bonus + desc = COUNCILLOR_IS_YOUR_FRIEND + } + } + if = { # Best Friend + limit = { + scope:councillor_liege = { + has_relation_best_friend = scope:councillor + } + } + add = { + value = scope:councillor.court_chaplain_conversion_monthly_increase_best_friend_bonus + desc = COUNCILLOR_IS_YOUR_BEST_FRIEND + } + } + if = { # Rival + limit = { + scope:councillor_liege = { + has_relation_rival = scope:councillor + NOT = { has_relation_nemesis = scope:councillor } + } + } + add = { + value = scope:councillor.court_chaplain_conversion_monthly_increase_rival_bonus + desc = COUNCILLOR_IS_YOUR_RIVAL + } + } + if = { # Nemesis + limit = { + scope:councillor_liege = { + has_relation_nemesis = scope:councillor + } + } + add = { + value = scope:councillor.court_chaplain_conversion_monthly_increase_nemesis_bonus + desc = COUNCILLOR_IS_YOUR_NEMESIS + } + } + #Conversion modifiers from where the Faith is on the Pluralism spectrum. + if = { + limit = { + scope:councillor.faith = { + has_doctrine_parameter = pluralism_fundamentalist_proselytization_bonus + } + } + add = { + value = scope:councillor.conversion_fundamentalist_faith_bonus + desc = COURT_CHAPLAIN_CONVERSION_FUNDAMENTALIST_FAITH_BONUS + } + } + if = { + limit = { + scope:councillor.faith = { + has_doctrine_parameter = pluralism_pluralistic_proselytization_penalty + } + } + add = { + value = scope:councillor.conversion_pluralistic_faith_penalty + desc = COURT_CHAPLAIN_CONVERSION_PLURALISTIC_FAITH_PENALTY + } + } + + #Conversion penalties for County Faith Tenets + if = { + limit = { + exists = scope:county + scope:county.faith = { + has_doctrine = tenet_false_conversion_sanction + } + } + add = { + value = scope:councillor.conversion_false_conversion_sanction_resistance + desc = COURT_CHAPLAIN_CONVERSION_FALSE_CONVERSION_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:county.faith = { + has_doctrine = tenet_reincarnation + } + } + add = { + value = scope:councillor.conversion_reincarnation_resistance + desc = COURT_CHAPLAIN_CONVERSION_REINCARNATION_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:county.faith = { + has_doctrine = tenet_dharmic_pacifism + } + } + add = { + value = scope:councillor.conversion_dharmic_pacifism_resistance + desc = COURT_CHAPLAIN_CONVERSION_DHARMIC_PACIFISM_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:county.faith = { + has_doctrine_parameter = tenet_adaptive_conversion_resistance + } + } + add = { + value = scope:councillor.conversion_adaptive_resistance + desc = COURT_CHAPLAIN_CONVERSION_ADAPTIVE_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:county.faith = { + has_doctrine = tenet_pastoral_isolation + } + } + add = { + value = scope:councillor.conversion_pastoral_isolation_resistance + desc = COURT_CHAPLAIN_CONVERSION_PASTORAL_ISOLATION_MODIFIER + } + } + if = { + limit = { + scope:councillor.liege.faith = { has_doctrine = tenet_communal_identity } + exists = scope:county + NOT = { scope:county.culture = scope:councillor.liege.culture } + } + add = { + value = scope:councillor.conversion_communal_identity_resistance + desc = COURT_CHAPLAIN_CONVERSION_COMMUNAL_IDENTITY_PENALTY_MODIFIER + } + } + + # Tenet Modifiers + ## Bonuses + ### Mendicant Preachers + if = { + limit = { + scope:councillor.faith = { + has_doctrine_parameter = mendicant_preachers_conversion_active + } + } + add = { + value = scope:councillor.conversion_mendicant_preachers_bonus + desc = COURT_CHAPLAIN_CONVERSION_MENDICANT_PREACHERS_MODIFIER + } + } + ### Communal Identity + if = { + limit = { + exists = scope:county + scope:councillor.faith = { + has_doctrine_parameter = same_culture_conversion_bonus_active + } + scope:county.culture = scope:councillor.liege.culture + } + add = { + value = scope:councillor.conversion_communal_identity_bonus + desc = COURT_CHAPLAIN_CONVERSION_COMMUNAL_IDENTITY_BONUS_MODIFIER + } + } + ### GHW sans HoF buffs + if = { + limit = { + exists = scope:county + scope:councillor.faith = { + has_doctrine_parameter = ghw_no_hof_conversion_buffs_active + OR = { + has_doctrine_parameter = no_head_of_faith + NOT = { exists = religious_head } + } + holy_sites_controlled >= 1 + } + } + add = { + value = scope:councillor.conversion_ghw_tenet_no_hof_bonus + desc = COURT_CHAPLAIN_CONVERSION_GHW_TENET_NO_HOF_MODIFIER + } + } + ### Chthonic Redoubts + if = { + limit = { + exists = scope:county + scope:councillor.faith = { has_doctrine_parameter = easier_to_convert_faith_in_mountains } + scope:county = { + # We check any province and not just title province, to be generous. + any_county_province = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + } + add = { + value = scope:councillor.easier_to_convert_faith_in_mountains_bonus + desc = COURT_CHAPLAIN_CONVERSION_EASIER_TO_CONVERT_FAITH_IN_MOUNTAINS_BONUS_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:councillor.faith = { has_doctrine_parameter = easier_to_convert_faith_in_hills_forests } + scope:county = { + # We check any province and not just title province, to be generous. + any_county_province = { + OR = { + terrain = hills + terrain = forests + } + } + } + } + add = { + value = scope:councillor.easier_to_convert_faith_in_hills_forests_bonus + desc = COURT_CHAPLAIN_CONVERSION_EASIER_TO_CONVERT_FAITH_IN_HILLS_FORESTS_BONUS_MODIFIER + } + } + ## Maluses + ### Chthonic Redoubts + if = { + limit = { + exists = scope:county + scope:county = { + faith = { has_doctrine_parameter = harder_to_convert_faith_away_in_mountains } + # We check any province and not just title province, to be generous. + any_county_province = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + } + add = { + value = scope:councillor.harder_to_convert_faith_away_in_mountains_malus + desc = COURT_CHAPLAIN_CONVERSION_HARDER_TO_CONVERT_FAITH_AWAY_IN_MOUNTAINS_MALUS_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:county = { + faith = { has_doctrine_parameter = harder_to_convert_faith_away_in_hills_forests } + # We check any province and not just title province, to be generous. + any_county_province = { + OR = { + terrain = hills + terrain = forests + } + } + } + } + add = { + value = scope:councillor.harder_to_convert_faith_away_in_hills_forests_malus + desc = COURT_CHAPLAIN_CONVERSION_HARDER_TO_CONVERT_FAITH_AWAY_IN_HILLS_FORESTS_MALUS_MODIFIER + } + } + ### Syncretics + #### Syncretic tenets aim to allow a faith and a separate religion/family to coexist without one eating the other. Accordingly, we make it harder for you to syncretise with a faith *then* wipe it out. + if = { + limit = { + exists = scope:county + scope:councillor.faith = { has_doctrine_parameter = unreformed_syncretic_actor_opinion_active } + scope:county.faith = { has_doctrine_parameter = unreformed} + } + add = { + value = scope:councillor.conversion_syncretic_with_religion_malus + desc = COURT_CHAPLAIN_CONVERSION_SYNCRETIC_WITH_RELIGION_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:councillor.faith = { has_doctrine_parameter = christian_syncretic_actor_opinion_active } + scope:county.faith = { religion_tag = christianity_religion } + } + add = { + value = scope:councillor.conversion_syncretic_with_religion_malus + desc = COURT_CHAPLAIN_CONVERSION_SYNCRETIC_WITH_RELIGION_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:councillor.faith = { has_doctrine_parameter = islamic_syncretic_actor_opinion_active } + scope:county.faith = { religion_tag = islam_religion } + } + add = { + value = scope:councillor.conversion_syncretic_with_religion_malus + desc = COURT_CHAPLAIN_CONVERSION_SYNCRETIC_WITH_RELIGION_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:councillor.faith = { has_doctrine_parameter = jewish_syncretic_actor_opinion_active } + scope:county.faith = { religion_tag = judaism_religion } + } + add = { + value = scope:councillor.conversion_syncretic_with_religion_malus + desc = COURT_CHAPLAIN_CONVERSION_SYNCRETIC_WITH_RELIGION_MODIFIER + } + } + + #Various Modifier Penalties + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = tougher_to_convert } + } + add = { + value = -0.25 + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = easier_to_convert } + } + add = { + value = 0.25 + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = governance_1074_local_faith_respected_modifier } + } + add = { + value = scope:councillor.local_faith_respected_modifier_value + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = governance_1074_population_fled_persecution_modifier } + } + add = { + value = scope:councillor.population_fled_persecution_modifier_value + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } + if = { + limit = { + scope:councillor.liege = { + OR = { + has_character_modifier = defiant_high_king_conversion_boost_modifier + has_character_modifier = defiant_high_queen_conversion_boost_modifier + } + religion = religion:germanic_religion + } + scope:county.faith = { + NOT = { has_doctrine_parameter = unreformed } + } + } + add = { + value = scope:councillor.defiant_high_monarch_conversion_boost_value + desc = COURT_CHAPLAIN_CONVERSION_LIEGE_IS_DEFIANT_HIGH_MONARCH + } + } + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = court_6090_almoners_county_modifier } + } + add = { + value = scope:councillor.court_6090_almoners_modifier_value + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = hold_court_8200_vassal_modifier } + } + add = { + value = scope:councillor.court_8200_vassal_modifier_value + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = petition_liege_county_control_modifier } + } + add = { + value = scope:councillor.petition_liege_county_convert_modifier_value + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } + + #Conversion bonuses from certain Holy Sites. + if = { + limit = { + scope:councillor.faith = { + controls_holy_site = jerusalem + } + title:b_jerusalem = { + is_holy_site_of = scope:councillor.faith + } + } + add = { + value = scope:councillor.conversion_holy_site_jerusalem + desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_JERUSALEM + } + } + if = { + limit = { + scope:councillor.faith = { + controls_holy_site = kerala + } + title:b_honnore = { + is_holy_site_of = scope:councillor.faith + } + } + add = { + value = scope:councillor.conversion_holy_site_kerala + desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_KERALA + } + } + if = { + limit = { + exists = scope:county + scope:councillor.faith = { + controls_holy_site = iona + } + title:b_islay = { + is_holy_site_of = scope:councillor.faith + } + scope:county.title_province = { + geographical_region = world_europe_west_britannia + } + } + add = { + value = scope:councillor.conversion_holy_site_iona + desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_IONA + } + } + if = { + limit = { + exists = scope:county + scope:county.faith = { + controls_holy_site = wadi_el_milk + } + title:b_wadi_el-milk = { + is_holy_site_of = scope:councillor.faith + } + } + add = { + value = scope:councillor.conversion_holy_site_wadi_el_milk + desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_WADI_EL_MILK + } + } + if = { + limit = { + scope:councillor.faith = { + controls_holy_site = cordoba + } + title:b_cordoba = { + is_holy_site_of = scope:councillor.faith + } + } + add = { + value = scope:councillor.conversion_holy_site_cordoba + desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_CORDOBA + } + } + if = { + limit = { + exists = scope:county + scope:county.faith = { + controls_holy_site = visoki + } + title:b_visoki = { + is_holy_site_of = scope:councillor.faith + } + } + add = { + value = scope:councillor.conversion_holy_site_visoki + desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_VISOKI + } + } + + #Tradition modifiers + if = { + limit = { + exists = scope:county + scope:county.culture = { + has_cultural_parameter = more_easily_converted + } + } + add = { + value = conversion_culture_more_easily_converted + desc = TRADITION_RELIGION_BLENDING_CONVERSION_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:county.culture = { + has_cultural_parameter = harder_to_convert_county_faith + } + } + add = { + value = conversion_culture_harder_to_convert + desc = TRADITION_HARDER_TO_CONVERT_CONVERSION_MODIFIER + } + } + + # Struggle Bonuses/Penalties + ## Boost conversion in some phases. + if = { + limit = { + exists = scope:county + scope:county = { + any_county_struggle = { has_struggle_phase_parameter = county_faith_conversion_in_region_proceeds_faster } + } + } + add = { + value = scope:councillor.boost_county_conversion_phase_bonus_value + desc = CHAPLAIN_CONVERT_COUNTY_STRUGGLE_BONUS + } + } + ## Reduce it in others. + if = { + limit = { + exists = scope:county + scope:county = { + any_county_struggle = { + has_struggle_phase_parameter = county_faith_conversion_in_region_proceeds_slower + } + } + } + add = { + value = scope:councillor.boost_county_conversion_phase_malus_value + desc = CHAPLAIN_CONVERT_COUNTY_STRUGGLE_PENALTY + } + } + + # FP3 ending + if = { + limit = { + exists = global_var:fp3_struggle_ending + global_var:fp3_struggle_ending = flag:fp3_struggle_shia_caliphate_ending + scope:councillor.faith = { + has_doctrine = muhammad_succession_shia_doctrine + } + } + add = { + value = scope:councillor.court_chaplain_shia_promotion + desc = CONVERSION_FP3_STRUGGLE_ENDING_BONUS + } + } + else_if = { + limit = { + exists = global_var:fp3_struggle_ending + global_var:fp3_struggle_ending = flag:fp3_struggle_strengthen_caliphate_ending + scope:councillor.faith = { + has_doctrine = muhammad_succession_sunni_doctrine + } + } + add = { + value = scope:councillor.court_chaplain_sunni_promotion + desc = CONVERSION_FP3_STRUGGLE_ENDING_BONUS + } + } + + #Other + if = { + limit = { + scope:councillor.liege = { + has_trait = savior + } + } + add = { + value = scope:councillor.conversion_savior_liege + desc = COURT_CHAPLAIN_CONVERSION_LIEGE_IS_SAVIOR + } + } + if = { + limit = { + scope:councillor.liege = { + has_trait = divine_blood + } + } + add = { + value = scope:councillor.conversion_divine_blood_liege + desc = COURT_CHAPLAIN_CONVERSION_LIEGE_IS_DIVINE_BLOOD + } + } + if = { + limit = { + exists = scope:county + scope:county = { + has_variable = learning_encouraged_conversion + } + } + add = { + value = scope:councillor.conversion_learning_theology + desc = COURT_CHAPLAIN_CONVERSION_LEARNING_THEOLOGY + } + } + #Foreign-raised reformer is enforcing uniform faith + if = { + limit = { + scope:councillor.liege = { + has_character_flag = reformer_conversion + } + } + add = { + value = scope:councillor.court_chaplain_conversion_monthly_increase_perk_bonus + desc = CONVERSION_REFORMER_BONUS_VALUE + } + } +} + +convert_faith_fervor_modifier_scale = 0.5 # Fervor causes the conversion speed to scale from 150% to 50% of base. + +# Development penalty +convert_faith_development_penalty = { + value = 0 + if = { + limit = { exists = scope:county } + add = scope:councillor.court_chaplain_conversion_base + add = scope:councillor.court_chaplain_conversion_monthly_increase + add = scope:councillor.court_chaplain_conversion_monthly_increase_perk_bonus + add = { + add = { + add = scope:councillor.court_chaplain_progress_percentage + multiply = scope:councillor.faith.fervor + } + subtract = { + add = scope:councillor.court_chaplain_progress_percentage + multiply = scope:county.faith.fervor + } + if = { + limit = { + scope:councillor_liege = { has_perk = religious_icon_perk } + } + min = 0 + } + } + add = scope:councillor.court_chaplain_conversion_contextual_bonuses + multiply = { + subtract = scope:county.development_level + divide = 100 + min = -0.9 + } + } +} + +# Zealous Proselytizer bonus +court_chaplain_conversion_monthly_increase_perk_bonus = { + if = { + limit = { + OR = { + scope:councillor_liege = { has_perk = zealous_proselytizer_perk } + #Foreign-raised reformer uses same value + scope:councillor_liege = { has_character_flag = reformer_conversion } + } + } + add = court_chaplain_conversion_base_total + multiply = { + add = zealous_proselytizer_percentage + divide = 100 + } + } +} + +# Bureaucrats bonus +court_chaplain_conversion_monthly_increase_dynasty_perk_bonus = { + add = court_chaplain_conversion_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +court_chaplain_conversion_monthly_increase_family_business_bonus = { + add = court_chaplain_conversion_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +court_chaplain_conversion_monthly_increase_consulted_house_bonus = { + add = court_chaplain_conversion_base_total + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +# Friend Bonus +court_chaplain_conversion_monthly_increase_friend_bonus = { + add = court_chaplain_conversion_base_total + multiply = { + add = council_friend_impact_percentage + divide = 100 + } +} + +# Best Friend Bonus +court_chaplain_conversion_monthly_increase_best_friend_bonus = { + add = court_chaplain_conversion_base_total + multiply = { + add = council_best_friend_impact_percentage + divide = 100 + } +} + +# Rival Penalty +court_chaplain_conversion_monthly_increase_rival_bonus = { + add = court_chaplain_conversion_base_total + multiply = { + add = council_rival_impact_percentage + divide = 100 + } +} + +# Nemesis Penalty +court_chaplain_conversion_monthly_increase_nemesis_bonus = { + add = court_chaplain_conversion_base_total + multiply = { + add = council_nemesis_impact_percentage + divide = 100 + } +} + +# Convert "full" percentage value to 0-1 scale +court_chaplain_progress_percentage = { + add = court_chaplain_conversion_base_total + divide = 100 +} + +#### Various Doctrine bonuses and penalties +conversion_fundamentalist_faith_bonus = { + if = { + limit = { + scope:councillor.faith = { + has_doctrine_parameter = pluralism_fundamentalist_proselytization_bonus + } + } + value = court_chaplain_conversion_base_total + multiply = 0.2 + } +} + +conversion_pluralistic_faith_penalty = { + value = 0 + if = { + limit = { + scope:councillor.faith = { + has_doctrine_parameter = pluralism_pluralistic_proselytization_penalty + } + } + subtract = court_chaplain_conversion_base_total + multiply = 0.2 + } +} + +conversion_unreformed_faith_penalty = 0.3 + +conversion_false_conversion_sanction_resistance = { + value = 0 + if = { + limit = { + exists = scope:county + scope:county.faith = { + has_doctrine = tenet_false_conversion_sanction + } + } + subtract = court_chaplain_conversion_base_total + multiply = 0.3 + } +} + +conversion_reincarnation_resistance = { + value = 0 + if = { + limit = { + exists = scope:county + scope:county.faith = { + has_doctrine = tenet_reincarnation + } + } + subtract = court_chaplain_conversion_base_total + multiply = 0.2 + } +} + +conversion_dharmic_pacifism_resistance = { + value = 0 + if = { + limit = { + exists = scope:county + scope:county.faith = { + has_doctrine = tenet_dharmic_pacifism + } + } + subtract = court_chaplain_conversion_base_total + multiply = 0.2 + } +} + +conversion_adaptive_resistance = { + value = 0 + if = { + limit = { + exists = scope:county + scope:county.faith = { + has_doctrine_parameter = tenet_adaptive_conversion_resistance + } + } + subtract = court_chaplain_conversion_base_total + multiply = 0.3 + } +} + +conversion_culture_harder_to_convert = { + value = 0 + if = { + limit = { + exists = scope:county + scope:county.culture = { + has_cultural_parameter = harder_to_convert_county_faith + } + } + subtract = court_chaplain_conversion_base_total + multiply = 0.3 + } +} + +conversion_culture_more_easily_converted = { + value = 0 + if = { + limit = { + exists = scope:county + scope:county.culture = { + has_cultural_parameter = more_easily_converted + } + } + add = court_chaplain_conversion_base_total + multiply = 0.3 + } +} + +conversion_pastoral_isolation_resistance = { + value = 0 + if = { + limit = { + exists = scope:county + scope:county.faith = { + has_doctrine = tenet_pastoral_isolation + } + } + subtract = court_chaplain_conversion_base_total + multiply = 0.3 + } +} + +conversion_communal_identity_resistance = { + value = 0 + if = { + limit = { + scope:councillor.faith = { has_doctrine = tenet_communal_identity } + NOT = { scope:county.culture = scope:councillor.liege.culture } + } + subtract = court_chaplain_conversion_base_total + multiply = 0.5 + } +} + +conversion_mendicant_preachers_bonus = { + value = 0 + if = { + limit = { + scope:councillor.faith = { + has_doctrine_parameter = mendicant_preachers_conversion_active + } + } + add = court_chaplain_conversion_base_total + multiply = 0.33 + } +} + +conversion_communal_identity_bonus = { + value = 0 + if = { + limit = { + exists = scope:county + scope:councillor.faith = { + has_doctrine_parameter = same_culture_conversion_bonus_active + } + scope:county.culture = scope:councillor.liege.culture + } + add = court_chaplain_conversion_base_total + multiply = 0.50 + } +} + +conversion_communal_identity_penalty = { + value = 0 + subtract = court_chaplain_conversion_base_total + multiply = 0.50 +} + +conversion_ghw_tenet_multiplier_control = { + #Tweak this to control how much of a speed bonus per controlled holy site is given. + value = 0.25 +} + +conversion_ghw_tenet_no_hof_bonus = { + value = 1 + #add = court_chaplain_conversion_base_total + if = { + limit = { + faith = { holy_sites_controlled = 1 } + } + multiply = conversion_ghw_tenet_multiplier_control + } + else_if = { + limit = { + faith = { holy_sites_controlled = 2 } + } + multiply = { + value = conversion_ghw_tenet_multiplier_control + multiply = 2 + } + } + else_if = { + limit = { + faith = { holy_sites_controlled = 3 } + } + multiply = { + value = conversion_ghw_tenet_multiplier_control + multiply = 3 + } + } + else_if = { + limit = { + faith = { holy_sites_controlled = 4 } + } + multiply = { + value = conversion_ghw_tenet_multiplier_control + multiply = 4 + } + } + else_if = { + limit = { + faith = { holy_sites_controlled = 5 } + } + multiply = { + value = conversion_ghw_tenet_multiplier_control + multiply = 5 + } + } + else_if = { + limit = { + faith = { holy_sites_controlled = 6 } + } + multiply = { + value = conversion_ghw_tenet_multiplier_control + multiply = 6 + } + } + else_if = { + limit = { + faith = { holy_sites_controlled = 7 } + } + multiply = { + value = conversion_ghw_tenet_multiplier_control + multiply = 7 + } + } + else_if = { + limit = { + faith = { holy_sites_controlled = 8 } + } + multiply = { + value = conversion_ghw_tenet_multiplier_control + multiply = 8 + } + } + else_if = { + limit = { + faith = { holy_sites_controlled = 9 } + } + multiply = { + value = conversion_ghw_tenet_multiplier_control + multiply = 9 + } + } + else_if = { + limit = { + faith = { holy_sites_controlled >= 10 } + } + multiply = { + value = conversion_ghw_tenet_multiplier_control + multiply = 10 + } + } + #Not that you should ever really have ten holy sites, but just in case. +} +#### +easier_to_convert_faith_in_hills_forests_bonus_root_value = 0.5 + +easier_to_convert_faith_in_hills_forests_bonus_loc_control = { + value = easier_to_convert_faith_in_hills_forests_bonus_root_value + multiply = 100 +} + +easier_to_convert_faith_in_hills_forests_bonus = { + value = court_chaplain_conversion_base_total + multiply = easier_to_convert_faith_in_hills_forests_bonus_root_value +} + +harder_to_convert_faith_away_in_hills_forests_malus_root_value = -0.75 + +harder_to_convert_faith_away_in_hills_forests_malus_loc_control = { + value = harder_to_convert_faith_away_in_hills_forests_malus_root_value + multiply = 100 +} + +harder_to_convert_faith_away_in_hills_forests_malus = { + value = court_chaplain_conversion_base_total + multiply = harder_to_convert_faith_away_in_hills_forests_malus_root_value +} + +#### +easier_to_convert_faith_in_mountains_bonus_root_value = 0.5 + +easier_to_convert_faith_in_mountains_bonus_loc_control = { + value = easier_to_convert_faith_in_mountains_bonus_root_value + multiply = 100 +} + +easier_to_convert_faith_in_mountains_bonus = { + value = court_chaplain_conversion_base_total + multiply = easier_to_convert_faith_in_mountains_bonus_root_value +} + +harder_to_convert_faith_away_in_mountains_malus_root_value = -0.75 + +harder_to_convert_faith_away_in_mountains_malus_loc_control = { + value = harder_to_convert_faith_away_in_mountains_malus_root_value + multiply = 100 +} + +harder_to_convert_faith_away_in_mountains_malus = { + value = court_chaplain_conversion_base_total + multiply = harder_to_convert_faith_away_in_mountains_malus_root_value +} + +### Syncretism Penalties +conversion_syncretic_with_religion_malus = { + value = 0 + subtract = court_chaplain_conversion_base_total + multiply = conversion_syncretic_with_religion_malus_efficancy_procentage +} + +conversion_syncretic_with_religion_malus_efficancy_procentage = { + value = 1 + subtract = 0.25 +} + +### Various Modifier Penalties +local_faith_respected_modifier_value = { + value = 0 + subtract = court_chaplain_conversion_base_total + multiply = 0.15 +} + +### Various Modifier Bonuses +population_fled_persecution_modifier_value = { + value = 0 + add = court_chaplain_conversion_base_total + multiply = 0.15 +} + +court_6090_almoners_modifier_value = { + value = 0 + add = court_chaplain_conversion_base_total + multiply = 0.10 +} + +### Various Holy Site bonuses +conversion_holy_site_jerusalem = { + value = 0 + if = { + limit = { + scope:councillor.faith = { + controls_holy_site = jerusalem + } + } + add = court_chaplain_conversion_base_total + multiply = 0.20 + } +} + +conversion_holy_site_kerala = { + value = 0 + if = { + limit = { + scope:councillor.faith = { + controls_holy_site = kerala + } + } + add = court_chaplain_conversion_base_total + multiply = 0.50 + } +} + +conversion_holy_site_iona = { + value = 0 + if = { + limit = { + scope:councillor.faith = { + controls_holy_site = iona + } + } + add = court_chaplain_conversion_base_total + multiply = 0.30 + } +} + +conversion_holy_site_visoki = { + value = 0 + if = { + limit = { + scope:councillor.faith = { + controls_holy_site = visoki + } + } + add = court_chaplain_conversion_base_total + multiply = -0.50 + } +} + +conversion_holy_site_wadi_el_milk = { + value = 0 + if = { + limit = { + scope:councillor.faith = { + controls_holy_site = wadi_el_milk + } + } + add = court_chaplain_conversion_base_total + multiply = -0.50 + } +} + +conversion_holy_site_cordoba = { + value = 0 + if = { + limit = { + scope:councillor.faith = { + controls_holy_site = cordoba + } + } + add = court_chaplain_conversion_base_total + multiply = 0.20 + } +} + +### Various trait bonuses +conversion_savior_liege = { + if = { + limit = { + scope:councillor.liege = { + has_trait = savior + } + } + value = court_chaplain_conversion_base_total + multiply = 0.75 + } +} + +conversion_divine_blood_liege = { + if = { + limit = { + scope:councillor.liege = { + has_trait = divine_blood + } + } + value = court_chaplain_conversion_base_total + multiply = 0.25 + } +} + +conversion_learning_theology = { + if = { + limit = { + exists = scope:county + scope:county = { + has_variable = learning_encouraged_conversion + } + } + value = court_chaplain_conversion_base_total + multiply = 0.25 + } +} + +##### Learn on the Job Skill bonus for Liege +court_chaplain_learn_on_the_job_scale = { + value = 0 + if = { + limit = { + liege = { has_perk = learn_on_the_job_perk } + } + add = learning + multiply = { + add = learn_on_the_job_percentage + divide = 100 + } + floor = yes + min = 1 + } +} + +### Reliable House modifier +court_chaplain_reliable_house_scale = { + value = 0 + if = { + limit = { + exists = liege.dynasty + liege.dynasty = { has_dynasty_perk = fp2_coterie_legacy_2 } + house = liege.house + } + add = learning + multiply = { + add = council_reliable_house_percentage + divide = 100 + } + floor = yes + min = 1 + } +} + + +### FP3 Struggle Ending +court_chaplain_sunni_promotion = { + if = { + limit = { + exists = global_var:fp3_struggle_ending + global_var:fp3_struggle_ending = flag:fp3_struggle_strengthen_caliphate_ending + faith = { + has_doctrine = muhammad_succession_sunni_doctrine + } + } + value = court_chaplain_conversion_base_total + multiply = 0.5 + floor = yes + min = 1 + } +} + +court_chaplain_shia_promotion = { + if = { + limit = { + exists = global_var:fp3_struggle_ending + global_var:fp3_struggle_ending = flag:fp3_struggle_shia_caliphate_ending + faith = { + has_doctrine = muhammad_succession_shia_doctrine + } + } + value = court_chaplain_conversion_base_total + multiply = 0.5 + floor = yes + min = 1 + } +} diff --git a/common/script_values/99_marshal_values.txt b/common/script_values/99_marshal_values.txt new file mode 100644 index 00000000..35c84159 --- /dev/null +++ b/common/script_values/99_marshal_values.txt @@ -0,0 +1,647 @@ + +###################### +# Organize Levies +###################### + +### Improving Levies +# Base value +marshal_organize_levies_base = { + add = 1 +} + +marshal_organize_levies_skill_base = { + add = martial + multiply = 2 +} + +# Erudition bonus +marshal_organize_levies_erudition_bonus = { + if = { + limit = { councillor_liege_has_erudition_legacy_5_perk = yes } + add = { + value = marshal_organize_levies_base + add = marshal_organize_levies_skill_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } + } + } +} + +# Tradition: Family business +marshal_organize_levies_family_business_bonus = { + if = { + limit = { councillor_liege_has_family_business_bonus = yes } + add = { + value = marshal_organize_levies_base + add = marshal_organize_levies_skill_base + multiply = { + add = family_business_councillors_percentage + divide = 100 + } + } + } +} + +marshal_organize_levies_consulted_house_bonus = { + if = { + limit = { councillor_liege_has_consulted_house_bonus = yes } + add = { + value = marshal_organize_levies_base + add = marshal_organize_levies_skill_base + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } + } + } +} + +marshal_organize_levies_pandidakterion_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_title = title:c_byzantion + title:c_byzantion = { has_county_modifier = pandidakterion_university_modifier } + } + } + add = { + value = marshal_organize_levies_base + add = marshal_organize_levies_skill_base + multiply = { + add = 10 + divide = 100 + } + } + } +} + +# Final value +marshal_organize_levies_modifier_total = { + add = marshal_organize_levies_base + add = marshal_organize_levies_skill_base + add = marshal_organize_levies_erudition_bonus + add = marshal_organize_levies_family_business_bonus + add = marshal_organize_levies_consulted_house_bonus + add = marshal_organize_levies_pandidakterion_bonus +} + +### Army maintenance +# Base value +marshal_organize_levies_maintenance_base = { + add = 1 +} + +marshal_organize_levies_maintenance_skill_base = { + add = martial +} + +# Erudition bonus +marshal_organize_levies_maintenance_erudition_bonus = { + if = { + limit = { councillor_liege_has_erudition_legacy_5_perk = yes } + add = { + value = marshal_organize_levies_maintenance_base + add = marshal_organize_levies_maintenance_skill_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } + } + } +} + +# Tradition: Family business +marshal_organize_levies_maintenance_family_business_bonus = { + if = { + limit = { councillor_liege_has_family_business_bonus = yes } + add = { + value = marshal_organize_levies_maintenance_base + add = marshal_organize_levies_maintenance_skill_base + multiply = { + add = family_business_councillors_percentage + divide = 100 + } + } + } +} + +# FP3 Consulted House +marshal_organize_levies_maintenance_consulted_house_bonus = { + if = { + limit = { councillor_liege_has_consulted_house_bonus = yes } + add = { + value = marshal_organize_levies_maintenance_base + add = marshal_organize_levies_maintenance_skill_base + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } + } + } +} + +task_organize_levies_maintenance_pandidakterion_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_title = title:c_byzantion + title:c_byzantion = { has_county_modifier = pandidakterion_university_modifier } + } + } + add = { + value = marshal_organize_levies_base + add = marshal_organize_levies_skill_base + multiply = { + add = 10 + divide = 100 + } + } + } +} + +# Final value +marshal_organize_levies_maintenance_total = { + add = marshal_organize_levies_maintenance_base + add = marshal_organize_levies_maintenance_skill_base + add = marshal_organize_levies_maintenance_erudition_bonus + add = marshal_organize_levies_maintenance_family_business_bonus + add = marshal_organize_levies_maintenance_consulted_house_bonus + add = task_organize_levies_maintenance_pandidakterion_bonus +} + +######################## +# Train Commanders +######################## + +### Overtime Boost MaA +# Base modifier +marshal_maa_overtime_boost_base = { + add = martial +} + +# Max value +marshal_maa_overtime_boost_max = { + add = martial +} + +# Monthly Increase +marshal_maa_overtime_boost_monthly_increase = { + add = 1 +} + +# Current +marshal_maa_overtime_boost_scale = { + add = 0 + if = { + limit = { + has_variable = marshal_maa_overtime_boost + } + add = var:marshal_maa_overtime_boost + } +} + +## Boost Knights +marshal_knights_overtime_boost_scale = { + add = 0 + if = { + limit = { + has_variable = marshal_maa_overtime_boost + } + add = var:marshal_maa_overtime_boost + } +} + + + +### Improve commanders +# Base value +marshal_train_commanders_monthly_chance_value_base = { + add = martial + divide = 2 +} +# Erudition value +marshal_train_commanders_monthly_chance_erudition_bonus = { + add = marshal_train_commanders_monthly_chance_value_base + multiply = erudition_legacy_5_percentage + divide = 100 +} + +# Family Business +marshal_train_commanders_monthly_chance_family_business_bonus = { + add = marshal_train_commanders_monthly_chance_value_base + multiply = family_business_councillors_percentage + divide = 100 +} + +# FP3 Consulted House +marshal_train_commanders_monthly_chance_consulted_house_bonus = { + add = marshal_train_commanders_monthly_chance_value_base + multiply = consulted_house_councillors_percentage + divide = 100 +} + +# Master of Horse +marshal_train_commanders_monthly_chance_master_of_horse_bonus = { + add = marshal_train_commanders_monthly_chance_value_base + multiply = 10 + divide = 100 +} + +# Total value +marshal_train_commanders_monthly_chance_value = { + value = marshal_train_commanders_monthly_chance_value_base + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = marshal_train_commanders_monthly_chance_erudition_bonus + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = marshal_train_commanders_monthly_chance_family_business_bonus + } + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = marshal_train_commanders_monthly_chance_consulted_house_bonus + } + if = { + limit = { + scope:councillor_liege = { + OR = { + has_character_modifier = employer_booner_master_of_horse_2_modifier + has_character_modifier = employer_booner_master_of_horse_3_modifier + } + } + } + add = marshal_train_commanders_monthly_chance_master_of_horse_bonus + } +} + +task_supress_crime_progress = { + add = martial + divide = 10 +} + + +################################ +# Increase Control +################################ +marshal_increase_control_full_progress = { + if = { + limit = { exists = scope:county } + add = scope:county.monthly_county_control_change + } +} + +marshal_increase_control_current_progress = { + value = 0 + if = { + limit = { exists = scope:county } + add = scope:county.county_control + } +} + +marshal_increase_control_base = 0.2 + +marshal_increase_county_control_monthly_change = { + add = martial + divide = 30 +} + +marshal_increase_control_base_total = { + add = marshal_increase_control_base + add = marshal_increase_county_control_monthly_change +} + +marshal_increase_control_monthly_increase_friend_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_friend = scope:councillor + NOT = { has_relation_best_friend = scope:councillor } + } + } + add = { + value = marshal_increase_control_base_total + multiply = { + value = council_friend_impact_percentage + divide = 100 + } + } + } +} +marshal_increase_control_monthly_increase_best_friend_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_best_friend = scope:councillor + } + } + add = { + value = marshal_increase_control_base_total + multiply = { + value = council_best_friend_impact_percentage + divide = 100 + } + } + } +} +marshal_increase_control_monthly_increase_rival_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_rival = scope:councillor + NOT = { has_relation_nemesis = scope:councillor } + } + } + add = { + value = marshal_increase_control_base_total + multiply = { + value = council_rival_impact_percentage + divide = 100 + } + } + } +} +marshal_increase_control_monthly_increase_nemesis_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_nemesis = scope:councillor + } + } + add = { + value = marshal_increase_control_base_total + multiply = { + value = council_nemesis_impact_percentage + divide = 100 + } + } + } +} + +marshal_increase_county_control_perk_bonus_monthly_change = { + value = 0 + if = { + limit = { + exists = liege + liege = { has_perk = strict_organization_perk } + } + add = marshal_increase_control_base_total + multiply = { + add = strict_organization_percentage + divide = 100 + } + } +} + +marshal_increase_county_control_erudition_bonus_monthly_change = { + value = 0 + add = marshal_increase_control_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +marshal_increase_county_control_family_business_bonus_monthly_change = { + value = 0 + add = marshal_increase_control_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +marshal_increase_county_control_consulted_house_bonus_monthly_change = { + value = 0 + add = marshal_increase_control_base_total + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +marshal_increase_county_control_experience_bonus_monthly_change = { + value = 0 + add = marshal_increase_control_base_total + multiply = { + add = 10 + divide = 100 + } +} + +marshal_increase_control_total = { + value = marshal_increase_control_base + add = marshal_increase_county_control_monthly_change + add = marshal_increase_control_monthly_increase_friend_bonus + add = marshal_increase_control_monthly_increase_best_friend_bonus + add = marshal_increase_control_monthly_increase_rival_bonus + add = marshal_increase_control_monthly_increase_nemesis_bonus + add = marshal_increase_county_control_perk_bonus_monthly_change + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = marshal_increase_county_control_erudition_bonus_monthly_change + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = marshal_increase_county_control_family_business_bonus_monthly_change + } + if = { + limit = { + has_character_modifier = event_bonus_to_county_control + } + add = marshal_increase_county_control_experience_bonus_monthly_change + } +} + +marshal_councillor_county_corruption_value = { + add = martial + divide = 5 +} + +marshal_county_county_corruption_value = { + if = { + limit = { exists = scope:county } + add = scope:county.county_control + divide = 5 + } +} + +marshal_remove_county_corruption_chance = { + add = martial + if = { + limit = { exists = scope:county } + add = { + value = scope:county.county_control + } + } + divide = 5 +} + +marshal_learn_on_the_job_scale = { + value = 0 + if = { + limit = { + liege = { has_perk = learn_on_the_job_perk } + } + add = martial + multiply = { + add = learn_on_the_job_percentage + divide = 100 + } + floor = yes + min = 1 + } +} + +marshal_scheme_overtime_boost_scale = { + add = 0 + if = { + limit = { + has_variable = marshal_overtime_decrease + } + subtract = var:marshal_overtime_decrease + } +} + +# Monthly Increase +marshal_overtime_boost_monthly_increase = { + add = martial + multiply = 0.1 + floor = yes + min = 0.1 +} + +marshal_overtime_decrease_monthly_increase = { + subtract = martial + multiply = 0.05 +} + +# Max value +marshal_overtime_boost_base = { + add = martial + multiply = 2 +} + +marshal_manage_guards_max_erudition_bonus = { + if = { + limit = { councillor_liege_has_erudition_legacy_5_perk = yes } + add = marshal_overtime_boost_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } + } +} + +marshal_manage_guards_max_family_business_bonus = { + if = { + limit = { councillor_liege_has_family_business_bonus = yes } + add = marshal_overtime_boost_base + multiply = { + add = family_business_councillors_percentage + divide = 100 + } + } +} + +marshal_manage_guards_max_consulted_house_bonus = { + if = { + limit = { councillor_liege_has_consulted_house_bonus = yes } + add = marshal_overtime_boost_base + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } + } +} + +marshal_overtime_boost_max = { + add = marshal_overtime_boost_base + add = marshal_manage_guards_max_erudition_bonus + add = marshal_manage_guards_max_family_business_bonus + add = marshal_manage_guards_max_consulted_house_bonus +} + +marshal_overtime_boost_scale = { + value = 0 + if = { + limit = { + scope:councillor_liege = { + is_ai = yes + is_independent_ruler = yes + } + } + add = marshal_overtime_boost_max + } + else_if = { + limit = { + scope:councillor_liege = { has_variable = marshal_overtime_boost } + } + add = liege.var:marshal_overtime_boost + } +} + +marshal_overtime_decrease_base = { + subtract = martial + multiply = 2 + floor = yes + min = -40 +} + +marshal_overtime_decrease_max = { + add = marshal_overtime_decrease_base + subtract = marshal_manage_guards_max_erudition_bonus + subtract = marshal_manage_guards_max_family_business_bonus + subtract = marshal_manage_guards_max_consulted_house_bonus +} + +marshal_overtime_decrease_scale = { + value = 0 + if = { + limit = { + scope:councillor_liege = { + is_ai = yes + is_independent_ruler = yes + } + } + add = marshal_overtime_decrease_max + } + else_if = { + limit = { + scope:councillor_liege = { has_variable = marshal_overtime_boost } + } + add = liege.var:marshal_overtime_decrease + } + multiply = -1 +} + +### Reliable House modifier +marshal_reliable_house_scale = { + value = 0 + if = { + limit = { + exists = liege.dynasty + liege.dynasty = { has_dynasty_perk = fp2_coterie_legacy_2 } + house = liege.house + } + add = martial + multiply = { + add = council_reliable_house_percentage + divide = 100 + } + floor = yes + min = 1 + } +} diff --git a/common/script_values/99_steward_values.txt b/common/script_values/99_steward_values.txt new file mode 100644 index 00000000..993e1f21 --- /dev/null +++ b/common/script_values/99_steward_values.txt @@ -0,0 +1,1246 @@ +# Can't reference a named value that hasn't been defined yet, so this file is late in the load order +# Feel free to use other files as well, but be careful about load order +# Please remove the example formulas once there's a few real formulas + + +steward_learn_on_the_job_scale = { + value = 0 + if = { + limit = { + liege = { has_perk = learn_on_the_job_perk } + } + add = stewardship + multiply = { + add = learn_on_the_job_percentage + divide = 100 + } + floor = yes + min = 1 + } +} + +### Reliable House modifier +steward_reliable_house_scale = { + value = 0 + if = { + limit = { + exists = liege.dynasty + liege.dynasty = { has_dynasty_perk = fp2_coterie_legacy_2 } + house = liege.house + } + add = stewardship + multiply = { + add = council_reliable_house_percentage + divide = 100 + } + floor = yes + min = 1 + } +} + + +######################################### +########## COLLECT TAXES TASK ########### +######################################### + +steward_collect_taxes_scale_base = { + add = stewardship + divide = 2 +} + +steward_collect_taxes_perk_bonus_scale = { + add = steward_collect_taxes_scale_base + multiply = { + add = tax_man_perk_percentage + divide = 100 + } +} + +steward_collect_taxes_erudition_bonus_scale = { + add = steward_collect_taxes_scale_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +steward_collect_taxes_family_business_bonus_scale = { + add = steward_collect_taxes_scale_base + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +steward_collect_taxes_consulted_house_bonus_scale = { + add = steward_collect_taxes_scale_base + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +steward_collect_taxes_scale_tooltip_total = { + add = steward_collect_taxes_scale_base + if = { + limit = { + scope:councillor_liege = { has_perk = tax_man_perk } + } + add = steward_collect_taxes_perk_bonus_scale + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = steward_collect_taxes_erudition_bonus_scale + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = steward_collect_taxes_family_business_bonus_scale + } + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = steward_collect_taxes_consulted_house_bonus_scale + } +} + +steward_collect_taxes_total_scale = { + add = steward_collect_taxes_scale_tooltip_total + divide = 100 +} + +steward_collect_taxes_bonus_tax_income = { + add = medium_gold_value + multiply = stewardship + divide = 10 +} + +######################################### +######### DEVELOP COUNTY TASK ########### +######################################### + +steward_develop_county_full_progress = { + if = { + limit = { exists = scope:county } + add = scope:county.development_rate + } +} + +steward_develop_county_current_progress = { + value = 0 + if = { + limit = { exists = scope:county } + add = scope:county.development_towards_level_increase + } +} + +steward_develop_county_base = { + add = 0.1 +} + +steward_develop_county_monthly_increase = { + add = stewardship + multiply = 0.175 +} + +steward_develop_county_base_total = { + add = steward_develop_county_base + add = steward_develop_county_monthly_increase +} + +steward_develop_county_modifier_scale = { + add = steward_develop_county_base_total + divide = 100 +} + +# Relation impact +steward_develop_county_monthly_increase_friend_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_friend = scope:councillor + NOT = { has_relation_best_friend = scope:councillor } + } + } + value = steward_develop_county_base_total + multiply = { + add = council_friend_impact_percentage + divide = 100 + } + } +} +steward_develop_county_monthly_increase_best_friend_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_best_friend = scope:councillor + } + } + value = steward_develop_county_base_total + multiply = { + add = council_best_friend_impact_percentage + divide = 100 + } + } +} +steward_develop_county_monthly_increase_rival_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_rival = scope:councillor + NOT = { has_relation_nemesis = scope:councillor } + } + } + value = steward_develop_county_base_total + multiply = { + add = council_rival_impact_percentage + divide = 100 + } + } +} +steward_develop_county_monthly_increase_nemesis_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_nemesis = scope:councillor + } + } + value = steward_develop_county_base_total + multiply = { + add = council_nemesis_impact_percentage + divide = 100 + } + } +} + +steward_develop_county_perk_bonus_monthly_increase = { + value = 0 + if = { + limit = { + liege = { has_perk = planned_cultivation_perk } + } + add = steward_develop_county_base_total + multiply = { + add = planned_cultivation_percentage + divide = 100 + } + } +} + +steward_develop_county_erudition_bonus_monthly_increase = { + value = 0 + add = steward_develop_county_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +steward_develop_county_family_business_monthly_increase = { + value = 0 + add = steward_develop_county_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +steward_develop_county_consulted_house_monthly_increase = { + value = 0 + add = steward_develop_county_base_total + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +steward_develop_county_total = { + add = steward_develop_county_base + add = steward_develop_county_monthly_increase + add = steward_develop_county_monthly_increase_friend_bonus + add = steward_develop_county_monthly_increase_best_friend_bonus + add = steward_develop_county_monthly_increase_rival_bonus + add = steward_develop_county_monthly_increase_nemesis_bonus + add = steward_develop_county_perk_bonus_monthly_increase + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = steward_develop_county_erudition_bonus_monthly_increase + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = steward_develop_county_family_business_monthly_increase + } +} + +steward_develop_county_tribal_penalty = { + value = 0 + if = { + limit = { + scope:councillor_liege = { + should_apply_tribal_development_penalty_trigger = yes + } + } + add = scope:councillor.steward_develop_county_total + add = scope:councillor.steward_develop_county_perk_bonus_monthly_increase + multiply = -0.5 + } +} + +steward_develop_county_perk_bonus_modifier_scale = { + value = 0 + if = { + limit = { + liege = { has_perk = planned_cultivation_perk } + } + add = steward_develop_county_modifier_scale + multiply = 0.2 + } +} + +current_development_penalty = { + value = 0 + if = { + limit = { + exists = scope:county + } + add = scope:councillor.steward_develop_county_base_total + add = scope:councillor.steward_develop_county_perk_bonus_monthly_increase + add = scope:councillor.steward_develop_county_tribal_penalty + multiply = { + subtract = scope:county.development_level + multiply = { + value = 9.13 # Due to the way the development penalty is calculated, this means you reach maximum penalty at Development Level 10. + # If you want really mathy-stuff, the formula is: Monthly Increase - (Monthly Increase(Development Level/100)*Above Number) + if = { + limit = { culture = { has_innovation = innovation_development_04 } } + multiply = 0.1111 # With Rennisance Thought, this is increased to Development Level 90. + } + else_if = { + limit = { culture = { has_innovation = innovation_development_03 } } + multiply = 0.1818 # With Urbanization, Development Level 55. + } + else_if = { + limit = { culture = { has_innovation = innovation_development_02 } } + multiply = 0.2856 # With Communal Government, Development Level 35. + } + else_if = { + limit = { culture = { has_innovation = innovation_development_01 } } + multiply = 0.5000 # With the Public Works innovation, Development Level 20. + } + } + divide = 100 + min = -0.875 # This is the maximum penalty. + } + } +} + +######################################### +######### PROMOTE CULTURE TASK ########## +######################################### + +steward_promote_culture_base = 0.25 + +steward_promote_culture_monthly_increase = { + add = stewardship + divide = 20 +} + +steward_promote_culture_contextual_bonuses = { + # Relation Bonuses/Penalties + if = { # Friend + limit = { + scope:councillor_liege = { + has_relation_friend = scope:councillor + NOT = { has_relation_best_friend = scope:councillor } + } + } + add = { + value = scope:councillor.steward_promote_culture_monthly_increase_friend_bonus + desc = COUNCILLOR_IS_YOUR_FRIEND + } + } + if = { # Best Friend + limit = { + scope:councillor_liege = { + has_relation_best_friend = scope:councillor + } + } + add = { + value = scope:councillor.steward_promote_culture_monthly_increase_best_friend_bonus + desc = COUNCILLOR_IS_YOUR_BEST_FRIEND + } + } + if = { # Rival + limit = { + scope:councillor_liege = { + has_relation_rival = scope:councillor + NOT = { has_relation_nemesis = scope:councillor } + } + } + add = { + value = scope:councillor.steward_promote_culture_monthly_increase_rival_bonus + desc = COUNCILLOR_IS_YOUR_RIVAL + } + } + if = { # Nemesis + limit = { + scope:councillor_liege = { + has_relation_nemesis = scope:councillor + } + } + add = { + value = scope:councillor.steward_promote_culture_monthly_increase_nemesis_bonus + desc = COUNCILLOR_IS_YOUR_NEMESIS + } + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = { + value = steward_promote_culture_erudition_bonus + desc = ERUDITION_DYNASTY_PERK_BONUS_VALUE + } + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = { + value = scope:councillor.steward_promote_culture_family_business_bonus + desc = FAMILY_BUSINESS_BONUS_VALUE + } + } + if = { + limit = { + exists = scope:county + scope:councillor_liege.culture = { + is_hybrid_culture = yes + culture_age < culture_hybrid_cooldown + any_parent_culture = { + this = scope:county.culture + } + } + } + add = { + value = scope:councillor.promote_culture_hybrid_culture_vs_parents_bonus + desc = STEWARD_PROMOTE_CULTURE_HYBRID_VS_PARENTS_BONUS_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:councillor_liege.culture = { + is_divergent_culture = yes + culture_age < culture_hybrid_cooldown # Intentional + any_parent_culture = { + this = scope:county.culture + } + } + } + add = { + value = scope:councillor.promote_culture_divergent_culture_vs_parents_bonus + desc = STEWARD_PROMOTE_CULTURE_DIVERGENT_VS_PARENTS_BONUS_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:councillor_liege.faith = { + has_doctrine_parameter = same_faith_promote_culture_bonus_active + } + scope:county.faith = scope:councillor_liege.faith + } + add = { + value = scope:councillor.promote_culture_communal_identity_bonus + desc = STEWARD_PROMOTE_CULTURE_COMMUNAL_IDENTITY_BONUS_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:councillor_liege.faith = { has_doctrine_parameter = easier_to_convert_culture_in_same_faith_mountains } + scope:county = { + faith = scope:councillor_liege.faith + any_county_province = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + } + add = { + value = scope:councillor.promote_culture_easier_to_convert_culture_in_same_faith_mountains_bonus + desc = STEWARD_PROMOTE_CULTURE_EASIER_TO_CONVERT_CULTURE_IN_SAME_FAITH_MOUNTAINS_BONUS + } + } + if = { + limit = { + exists = scope:county + scope:councillor_liege.faith = { has_doctrine_parameter = easier_to_convert_culture_in_same_faith_hills_forests } + scope:county = { + faith = scope:councillor_liege.faith + any_county_province = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + } + add = { + value = scope:councillor.promote_culture_easier_to_convert_culture_in_same_faith_hills_forests_bonus + desc = STEWARD_PROMOTE_CULTURE_EASIER_TO_CONVERT_CULTURE_IN_SAME_FAITH_HILLS_FORESTS_BONUS + } + } + if = { + limit = { + scope:councillor_liege.culture = { + has_innovation = innovation_east_settling + } + } + add = { + value = scope:councillor.promote_culture_east_settling_bonus + desc = STEWARD_PROMOTE_CULTURE_INNOVATION_BONUS_EAST_SETTLING + } + } + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = 6210_architect_county_modifier } + } + add = { + value = scope:councillor.6210_architect_promote_culture_bonus + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = easier_to_culture_convert } + } + add = { + value = scope:councillor.easier_to_convert_bonus + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } + if = { + limit = { + scope:councillor_liege = { has_character_modifier = court_fashion_culture_modifier } + } + add = { + value = scope:councillor.steward_fashion_bonus + desc = COUNCILLOR_LIEGE_MODIFIERS_BONUS + } + } + #Reduce for various county modifiers. + # Cultural Traditions + ## Bonuses + if = { + limit = { + exists = scope:county + scope:county.culture = { has_cultural_parameter = easier_to_convert_county_culture_with_heritage } + scope:councillor_liege.culture = { has_same_culture_heritage = scope:county.culture } + } + add = { + value = conversion_culture_easier_to_culture_change_with_heritage_value + desc = TRADITION_EASIER_TO_CULTURE_CONVERT_WITH_HERITAGE_MODIFIER + } + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = { + value = steward_promote_culture_erudition_bonus_monthly_increase + desc = ERUDITION_DYNASTY_PERK_BONUS_VALUE + } + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = { + value = steward_promote_culture_family_business_monthly_increase + desc = FAMILY_BUSINESS_BONUS_VALUE + } + } + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = { + value = steward_promote_culture_consulted_house_monthly_increase + desc = CONSULTED_HOUSE_BONUS_VALUE + } + } + if = { + limit = { + scope:county = { + OR = { + has_county_modifier = 3020_own_culture_monument + has_county_modifier = 3020_multicultural_monument + } + } + } + add = { + value = hold_court_3020_culture_bonus + desc = 3020_MONUMENT_VALUE + } + } + ## Penalties + if = { + limit = { + exists = scope:county + scope:county.culture = { has_cultural_parameter = harder_to_convert_county_culture_without_heritage } + NOT = { + scope:councillor_liege.culture = { has_same_culture_heritage = scope:county.culture } + } + } + add = { + value = conversion_culture_resistant_to_culture_change_without_heritage_value + desc = TRADITION_HARDER_TO_CULTURE_CONVERT_WITHOUT_HERITAGE_MODIFIER + } + } + + if = { + limit = { + exists = scope:county + scope:county.culture = { has_cultural_parameter = harder_to_convert_county_culture } + } + add = { + value = conversion_culture_resistant_to_culture_change + desc = TRADITION_HARDER_TO_CULTURE_CONVERT + } + } + + # Struggles + ## Penalties + if = { + limit = { + exists = scope:county + scope:county = { + any_county_struggle = { has_struggle_phase_parameter = county_culture_conversion_in_region_proceeds_slower } + } + } + add = { + value = conversion_culture_resistant_to_culture_change_due_to_struggle_phase_value + desc = STRUGGLE_HARDER_TO_CULTURE_CONVERT_DUE_TO_STRUGGLE_PHASE_MODIFIER + } + } + ## Bonuses + if = { + limit = { + exists = scope:county + scope:county = { + any_county_struggle = { has_struggle_phase_parameter = county_culture_conversion_in_region_proceeds_faster } + } + } + add = { + value = conversion_culture_accepting_of_culture_change_due_to_struggle_phase_value + desc = STRUGGLE_EASIER_TO_CULTURE_CONVERT_DUE_TO_STRUGGLE_PHASE_MODIFIER + } + } + # Decisions + if = { + limit = { + OR = { + scope:councillor_liege.culture = { has_cultural_pillar = heritage_goidelic } + scope:councillor_liege.culture = { has_cultural_pillar = heritage_brythonic } + } + exists = scope:county + scope:county = { + has_county_modifier = reclaim_britannia_culture_modifier + NOR= { + culture = { has_cultural_pillar = heritage_goidelic } + culture = { has_cultural_pillar = heritage_brythonic } + } + } + } + add = { + value = promote_culture_reclaimed_brittania_bonus + desc = STEWARD_PROMOTE_CULTURE_RECLAIMING_BRITANNIA + } + } + + if = { + limit = { + scope:county.culture ?= { has_cultural_pillar = heritage_iranian } + exists = global_var:fp3_struggle_ending + global_var:fp3_struggle_ending = flag:fp3_struggle_rekindle_iran_ending + + NOT = { + scope:councillor_liege.culture = { has_same_culture_heritage = scope:county.culture } + } + } + add = { + value = conversion_culture_resistant_to_culture_change + desc = struggle_persia_ending_rekindle_iran_harder_to_convert_culture_reason + } + } + + if = { + limit = { + scope:councillor_liege.culture = { has_cultural_pillar = heritage_iranian } + exists = global_var:fp3_struggle_ending + global_var:fp3_struggle_ending = flag:fp3_struggle_rekindle_iran_ending + + NOT = { + scope:councillor_liege.culture = { has_same_culture_heritage = scope:county.culture } + } + } + add = { + value = conversion_culture_easy + desc = struggle_persia_ending_rekindle_iran_harder_to_convert_culture_reason + } + } + + # Events + if = { + limit = { + exists = scope:county + scope:county = { + has_county_modifier = governance_1073_conversion_resistance_modifier + } + } + add = { + value = scope:councillor.promote_culture_local_traditions_respected_penalty + desc = STEWARD_PROMOTE_CULTURE_LOCAL_TRADITIONS_RESPECTED + } + } + if = { + limit = { + exists = scope:county + scope:county = { + has_county_modifier = county_shuubiyya_modifier + } + } + add = { + value = scope:councillor.promote_culture_shuubiyya_penalty + desc = STEWARD_PROMOTE_CULTURE_SHUUBIYYA + } + } + if = { + limit = { + exists = scope:county + scope:county = { + OR = { + has_county_modifier = enthusiastic_nomad_settlement_saharan_modifier + has_county_modifier = nomad_settlement_saharan_modifier + } + } + } + add = { + value = scope:councillor.promote_culture_allowed_nomad_settlement_penalty + desc = STEWARD_PROMOTE_CULTURE_ALLOWED_NOMAD_SETTLEMENT + } + } + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = hold_court_8190_vassal_modifier } + } + add = { + value = scope:councillor.court_8190_vassal_modifier_value + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } +} + +steward_promote_culture_monthly_increase_friend_bonus = { + value = steward_promote_culture_monthly_increase + multiply = { + value = council_friend_impact_percentage + divide = 100 + } +} + +steward_promote_culture_base_total = { + add = steward_promote_culture_base + add = steward_promote_culture_monthly_increase +} + +steward_promote_culture_monthly_increase_best_friend_bonus = { + value = steward_promote_culture_base_total + multiply = { + value = council_best_friend_impact_percentage + divide = 100 + } +} +steward_promote_culture_monthly_increase_rival_bonus = { + value = steward_promote_culture_base_total + multiply = { + value = council_rival_impact_percentage + divide = 100 + } +} +steward_promote_culture_monthly_increase_nemesis_bonus = { + value = steward_promote_culture_base_total + multiply = { + value = council_nemesis_impact_percentage + divide = 100 + } +} + +steward_promote_culture_erudition_bonus = { + add = steward_promote_culture_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +steward_promote_culture_family_business_bonus = { + add = steward_promote_culture_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +promote_culture_communal_identity_bonus = { + value = 0 + add = steward_promote_culture_base_total + multiply = 0.50 +} + +promote_culture_easier_to_convert_culture_in_same_faith_mountains_bonus_root_value = 0.5 + +promote_culture_easier_to_convert_culture_in_same_faith_mountains_bonus_loc_control = { + value = promote_culture_easier_to_convert_culture_in_same_faith_mountains_bonus_root_value + multiply = 100 +} + +promote_culture_easier_to_convert_culture_in_same_faith_mountains_bonus = { + value = steward_promote_culture_base_total + multiply = promote_culture_easier_to_convert_culture_in_same_faith_mountains_bonus_root_value +} + +promote_culture_hybrid_culture_vs_parents_bonus = { + value = 0 + add = steward_promote_culture_base_total + multiply = 1.5 +} + +promote_culture_divergent_culture_vs_parents_bonus = { + value = 0 + add = steward_promote_culture_base_total + multiply = 1.3 +} + +promote_culture_east_settling_bonus = { + value = 0 + add = steward_promote_culture_base_total + multiply = 0.15 +} + +promote_culture_reclaimed_brittania_bonus = { + value = steward_promote_culture_base_total + multiply = 0.75 +} + +steward_promote_culture_erudition_bonus_monthly_increase = { + value = steward_promote_culture_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +steward_promote_culture_family_business_monthly_increase = { + value = steward_promote_culture_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +steward_promote_culture_consulted_house_monthly_increase = { + value = steward_promote_culture_base_total + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +hold_court_3020_culture_bonus = { + value = 0.1 +} + +promote_culture_local_traditions_respected_penalty = { + value = 0 + add = steward_promote_culture_base_total + multiply = -0.75 +} + +promote_culture_shuubiyya_penalty = { + value = 0 + if = { + limit = { + exists = scope:county + scope:county = { + has_county_modifier = county_shuubiyya_modifier + } + } + add = steward_promote_culture_base_total + multiply = -0.75 + } +} + +promote_culture_allowed_nomad_settlement_penalty = { + value = 0 + add = steward_promote_culture_base_total + multiply = -0.8 +} + +promote_culture_development_penalty = { + value = 0 + if = { + limit = { exists = scope:county } + add = scope:councillor.steward_promote_culture_base_total + add = scope:councillor.steward_promote_culture_contextual_bonuses + multiply = { + subtract = scope:county.development_level + divide = 100 + min = -0.9 + } + } +} + +conversion_culture_easier_to_culture_change_with_heritage_value = { + value = 0 + add = steward_promote_culture_base + multiply = 0.3 +} + +conversion_culture_resistant_to_culture_change_without_heritage_value = { + value = 0 + subtract = steward_promote_culture_base_total + multiply = 0.5 +} + +conversion_culture_resistant_to_culture_change = { + value = 0 + subtract = steward_promote_culture_base_total + multiply = 0.5 +} + +conversion_culture_resistant_to_culture_change_due_to_struggle_phase_value = { + value = 0 + subtract = steward_promote_culture_base + multiply = 0.5 +} + +conversion_culture_accepting_of_culture_change_due_to_struggle_phase_value = { + value = 0 + subtract = steward_promote_culture_base + multiply = -0.5 +} + +conversion_culture_easy = { + value = 0 + add = steward_promote_culture_base_total + multiply = 0.5 +} + +######################################### +######## CONVINCE DE JURE TASK ########## +######################################### + +steward_convince_dejure_base = 0.1 + +steward_convince_dejure_monthly_increase = { + add = stewardship + divide = 20 +} + +steward_convince_dejure_monthly_increase_friend_bonus = { + value = steward_convince_dejure_monthly_increase + multiply = { + value = council_friend_impact_percentage + divide = 100 + } +} +steward_convince_dejure_base_total = { + add = steward_convince_dejure_monthly_increase + add = steward_convince_dejure_monthly_increase_friend_bonus +} +steward_convince_dejure_monthly_increase_best_friend_bonus = { + value = steward_convince_dejure_base_total + multiply = { + value = council_best_friend_impact_percentage + divide = 100 + } +} +steward_convince_dejure_monthly_increase_rival_bonus = { + value = steward_convince_dejure_base_total + multiply = { + value = council_rival_impact_percentage + divide = 100 + } +} +steward_convince_dejure_monthly_increase_nemesis_bonus = { + value = steward_convince_dejure_base_total + multiply = { + value = council_nemesis_impact_percentage + divide = 100 + } +} + +steward_convince_dejure_erudition_bonus = { + add = steward_convince_dejure_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +steward_convince_dejure_family_business_bonus = { + add = steward_convince_dejure_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +steward_convince_dejure_consulted_house_bonus = { + add = steward_convince_dejure_base_total + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +######################################### +######### ACCEPT CULTURE TASK ########### +######################################### + +task_accept_culture_base_progress = { + value = 0.01 + multiply = scope:councillor_liege.primary_title.tier +} + +steward_accept_culture_base_total = { + add = task_accept_culture_base_progress + add = steward_accept_culture_yearly_increase +} + +steward_accept_culture_yearly_increase = { + add = stewardship + multiply = 0.005 +} + +steward_accept_culture_erudition_bonus_yearly_increase = { + add = steward_accept_culture_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +steward_accept_culture_customs_bonus_yearly_increase = { + add = steward_accept_culture_base_total + multiply = { + add = customs_legacy_percentage + divide = 100 + } +} + +# Relation impact +steward_accept_culture_yearly_increase_friend_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_friend = scope:councillor + NOT = { has_relation_best_friend = scope:councillor } + } + } + value = steward_accept_culture_base_total + multiply = { + add = council_friend_impact_percentage + divide = 100 + } + } +} +steward_accept_culture_yearly_increase_best_friend_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_best_friend = scope:councillor + } + } + value = steward_accept_culture_base_total + multiply = { + add = council_best_friend_impact_percentage + divide = 100 + } + } +} +steward_accept_culture_yearly_increase_rival_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_rival = scope:councillor + NOT = { has_relation_nemesis = scope:councillor } + } + } + value = steward_accept_culture_base_total + multiply = { + add = council_rival_impact_percentage + divide = 100 + } + } +} +steward_accept_culture_yearly_increase_nemesis_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_nemesis = scope:councillor + } + } + value = steward_accept_culture_base_total + multiply = { + add = council_nemesis_impact_percentage + divide = 100 + } + } +} +steward_accept_culture_yearly_increase_independent_bonus = { + value = 0 + if = { + limit = { + scope:councillor_liege = { + is_independent_ruler = yes + } + } + add = { + value = steward_accept_culture_base_total + multiply = 5 + } + } +} + +steward_accept_culture_court_type_bonus = { + value = 0 + if = { + limit = { + scope:councillor_liege = { + has_royal_court = yes + has_dlc_feature = royal_court + has_court_type = court_administrative + court_grandeur_current_level >= 4 + } + } + add = steward_accept_culture_base_total + multiply = { + value = court_administrative_steward_task_bonus + divide = 100 + } + } +} + +task_accept_culture_total_base_value = { + add = task_accept_culture_base_progress + add = steward_accept_culture_yearly_increase + if = { + limit = { + councillor_liege_has_customs_legacy_perk = yes + } + add = steward_accept_culture_customs_bonus_yearly_increase + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = steward_accept_culture_erudition_bonus_yearly_increase + } + add = steward_accept_culture_yearly_increase_friend_bonus + add = steward_accept_culture_yearly_increase_best_friend_bonus + add = steward_accept_culture_yearly_increase_rival_bonus + add = steward_accept_culture_yearly_increase_nemesis_bonus + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = steward_accept_culture_family_business_bonus_yearly_increase + } + if = { + limit = { + exists = scope:county + scope:councillor.culture = scope:county.culture + } + add = steward_accept_culture_yearly_increase_same_culture_bonus + } +} + +task_accept_culture_progress = { + add = task_accept_culture_base_progress + add = steward_accept_culture_yearly_increase + if = { + limit = { + councillor_liege_has_customs_legacy_perk = yes + } + add = steward_accept_culture_customs_bonus_yearly_increase + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = steward_accept_culture_erudition_bonus_yearly_increase + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = steward_accept_culture_family_business_bonus_yearly_increase + } + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = steward_accept_culture_consulted_house_bonus_yearly_increase + } + add = steward_accept_culture_yearly_increase_friend_bonus + add = steward_accept_culture_yearly_increase_best_friend_bonus + add = steward_accept_culture_yearly_increase_rival_bonus + add = steward_accept_culture_yearly_increase_nemesis_bonus + add = steward_accept_culture_yearly_increase_independent_bonus + add = steward_accept_culture_court_type_bonus + if = { + limit = { + exists = scope:county + scope:councillor.culture = scope:county.culture + } + add = steward_accept_culture_yearly_increase_same_culture_bonus + } +} + +steward_accept_culture_family_business_bonus_yearly_increase = { + add = steward_accept_culture_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +steward_accept_culture_consulted_house_bonus_yearly_increase = { + add = steward_accept_culture_base_total + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +steward_accept_culture_yearly_increase_same_culture_bonus = { + value = steward_accept_culture_base_total + multiply = 0.25 +} diff --git a/gfx/interface/icons/faith_doctrines/blank_sample.dds b/gfx/interface/icons/faith_doctrines/blank_sample.dds new file mode 100644 index 00000000..851b97dc --- /dev/null +++ b/gfx/interface/icons/faith_doctrines/blank_sample.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b339a0062904f2a1718533ce51894d8d6aa4c3f0653acf9867fd18eba5b30de9 +size 416128 diff --git a/gfx/interface/icons/faith_doctrines/core_tenet_against_all_odds.dds b/gfx/interface/icons/faith_doctrines/core_tenet_against_all_odds.dds new file mode 100644 index 00000000..b883e3ff --- /dev/null +++ b/gfx/interface/icons/faith_doctrines/core_tenet_against_all_odds.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f58e8af5237e3118bcdd2294e1c522097f8e6076d44d623794901180eb4a7091 +size 416128 diff --git a/gfx/interface/icons/faith_doctrines/core_tenet_for_king_and_country.dds b/gfx/interface/icons/faith_doctrines/core_tenet_for_king_and_country.dds new file mode 100644 index 00000000..4bb39442 --- /dev/null +++ b/gfx/interface/icons/faith_doctrines/core_tenet_for_king_and_country.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e23ffbc3f85bdcb1d474e13325962319fe6e8754e5cc506b28fb48568077df3 +size 416128 diff --git a/gfx/interface/icons/faith_doctrines/special_doctrine_via_media.dds b/gfx/interface/icons/faith_doctrines/special_doctrine_via_media.dds new file mode 100644 index 00000000..ee9dfba2 --- /dev/null +++ b/gfx/interface/icons/faith_doctrines/special_doctrine_via_media.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cccde1b428b28dd660d061d201c13864bd19905ead02bd60e37c65923e6f6ce +size 57728 diff --git a/gfx/interface/icons/faith_doctrines/the_king_of_winter.dds b/gfx/interface/icons/faith_doctrines/the_king_of_winter.dds new file mode 100644 index 00000000..7917d3c8 --- /dev/null +++ b/gfx/interface/icons/faith_doctrines/the_king_of_winter.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad1eba93a351b1778a6d43a36386cc14c762de07d4c4af54cdcb1a0aeef13e69 +size 416128 diff --git a/gfx/interface/icons/faith_doctrines/the_queen_of_summer.dds b/gfx/interface/icons/faith_doctrines/the_queen_of_summer.dds new file mode 100644 index 00000000..88ab2374 --- /dev/null +++ b/gfx/interface/icons/faith_doctrines/the_queen_of_summer.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cd0aff1f849cdcd0febaef3c0406df4806c11919be2161e26ae61a8169b450e +size 416128 diff --git a/localization/english/replace/religion/NEOW_religion_core_tenets_l_english.yml b/localization/english/replace/religion/NEOW_religion_core_tenets_l_english.yml index f57a1c49..588073e9 100644 --- a/localization/english/replace/religion/NEOW_religion_core_tenets_l_english.yml +++ b/localization/english/replace/religion/NEOW_religion_core_tenets_l_english.yml @@ -7,6 +7,11 @@ doctrine_parameter_divine_the_stars_active:0 "Allows adherents to Divine the Sta doctrine_parameter_durandal_restoration_active:0 "Rulers may seek to restore Durendal" doctrine_parameter_novelist_title_replace_active:0 "Replaces most kingdom and empire titles in Western Europe" doctrine_parameter_hostility_override_special_doctrine_christian:0 "Christian [faiths|E] are considered only [GetHostilityLevelName( TOKEN_PARAMETER.GetIntValue )|V]" +doctrine_parameter_easier_to_convert_faith_in_hills_forests:0 "[convert_county|E] speed in Forest and Hill [terrain|E]: #P +[EmptyScope.ScriptValue('easier_to_convert_faith_in_hills_forests_bonus_loc_control')|0]%#!" +doctrine_parameter_easier_to_convert_culture_in_same_faith_hills_forests:0 "[promote_culture|E] speed in same-[faith|E] Forest and Hill [terrain|E]: #P +[EmptyScope.ScriptValue('promote_culture_easier_to_convert_culture_in_same_faith_hills_forests_bonus_loc_control')|0]%#!" +doctrine_parameter_harder_to_convert_faith_away_in_hills_forests:0 "Hostile [convert_county|E] speed in Forest and Hill [terrain|E]: #P [EmptyScope.ScriptValue('harder_to_convert_faith_away_in_hills_forests_malus_loc_control')|0]%#!" +special_doctrine_via_media_name:0 "Via Media" +special_doctrine_via_media_desc:0 "Sees all other Christians as Astray" tenet_lorekeepers_name:0 "Lorekeepers" tenet_lorekeepers_desc:0 "It is the duty of every Novelist to delve deep into the secrets of the world, seeking to unfold the illustrious Author's hidden meanings." tenet_the_first_age_name:0 "The First Age" @@ -21,3 +26,16 @@ tenet_people_of_the_book_name:0 "People of the Book" tenet_people_of_the_book_desc:0 "We wish for nothing less than to bring our brothers and sisters back into the fold of our faith. Our preachers travel far and wide, spreading the good word of Aslan to all those willing to listen." one_king_to_rule_them_all_name:0 "One King to Rule Them All" one_king_to_rule_them_all_desc:0 "The Lion rules not just over Heaven, but also over Earth and the men he died to save. The least we can do is enforce the laws of Heaven upon our worldly realms" +the_book_of_shadows_name:0 "The Book of Shadows" +the_book_of_shadows_desc:0 "Since time immemorial, our high priests and grand wizards have always been chosen from among the best. Only through diligent study and practice may one master our Craft. " +king_of_winter_name:0 "King of Winter" +king_of_winter_desc:0 "Our King protects us from the harshness of the winter, and all our priests and laymen value the honourable knight's protection more than any fat king's laws." +the_queen_of_summer_name:0 "The Queen of Summer" +the_queen_of_summer_desc:0 "Our Queen gave us all the wonders of the world to enjoy, and enjoy it we will in her name." +last_knights_of_britain_name:0 "Last Knights of Britain" +last_knights_of_britain_desc:0 "Our brave knights have valiantly held on to the last Christian forts in England for many years. Letting them fall would be our death." +against_all_odds_name:0 "Against All Odds" +against_all_odds_desc:0 "Just as the first Christians outlived the pagans of Rome, so too will we outlive all the pagans who wish to see us erased. Though Anglicans are forced to exist in secret, our resistance is a well known reality to all in Britain." +for_king_and_country_name:0 "For King and Country" +for_king_and_country_desc:0 "The King of England has been the head of our Church since its inception. Though the old throne was abolished, and in its place was built a brothel, we will ride forth with our King once he returns to save England." +